├── BUSY ├── LICENSE ├── README.md ├── build └── Readme.txt ├── prj ├── CMakeCompilers.txt ├── CMakeFunctions.txt ├── CMakeGCCheckVersion.txt ├── CMakeGlobals.txt ├── CMakeNAppGUI.txt ├── CMakeSDKVersion.txt ├── CMakeVSCheckVersion.txt ├── CMakeVSWarnings.txt ├── CMakeXCCheckVersion.txt ├── CMakeXCWarnings.txt ├── build.txt ├── depend │ └── stdint.h ├── script │ ├── linux │ │ ├── arm │ │ │ └── nrc │ │ ├── x64 │ │ │ └── nrc │ │ └── x86 │ │ │ └── nrc │ ├── osx │ │ ├── arm64 │ │ │ └── nrc │ │ ├── x64 │ │ │ └── nrc │ │ └── x86 │ │ │ └── nrc │ └── win │ │ ├── x64 │ │ └── nrc.exe │ │ └── x86 │ │ └── nrc.exe └── templates │ ├── Info.plist │ ├── banner.bmp │ ├── cmdmain.c │ ├── license.txt │ ├── logo.icns │ ├── logo256.ico │ ├── logo48.ico │ └── main.c ├── qmake ├── NAppGUI.def ├── NAppGUI.pro └── execute.lua └── src ├── BUSY ├── CMakeLists.txt ├── core ├── BUSY ├── CMakeLists.txt ├── array.c ├── array.h ├── arrpt.h ├── arrpt.hpp ├── arrpt.hxx ├── arrst.h ├── arrst.hpp ├── arrst.hxx ├── bhash.c ├── bhash.h ├── buffer.c ├── buffer.h ├── clock.c ├── clock.h ├── core.cpp ├── core.h ├── core.hxx ├── core.inl ├── core.ixx ├── coreall.h ├── date.c ├── date.h ├── dbind.c ├── dbind.h ├── dbind.inl ├── event.cpp ├── event.h ├── event.inl ├── heap.c ├── heap.h ├── heap.inl ├── hfile.c ├── hfile.h ├── hfile.inl ├── keybuf.c ├── keybuf.h ├── lex.c ├── lex.inl ├── nfa.c ├── nfa.inl ├── obj.c ├── obj.inl ├── rbtree.c ├── rbtree.h ├── regex.c ├── regex.h ├── respack.c ├── respack.h ├── respack.inl ├── respackh.h ├── setpt.h ├── setpt.hpp ├── setpt.hxx ├── setst.h ├── setst.hpp ├── setst.hxx ├── stream.c ├── stream.h ├── stream.inl ├── strings.c ├── strings.h ├── tfilter.c └── tfilter.inl ├── demo ├── BUSY ├── bode │ ├── BUSY │ ├── CMakeLists.txt │ ├── bdcalc.c │ ├── bdcalc.h │ ├── bdctrl.c │ ├── bdctrl.h │ ├── bdmodel.c │ ├── bdmodel.h │ ├── bdplot.c │ ├── bdplot.h │ ├── bdview.c │ ├── bdview.h │ ├── bode.c │ ├── bode.hxx │ └── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── bricks │ ├── CMakeLists.txt │ ├── bricks.c │ └── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── casino │ ├── BUSY │ ├── CMakeLists.txt │ ├── casino.c │ ├── casino.h │ ├── casino.hxx │ ├── ddraw.c │ └── ddraw.h ├── dice │ ├── CMakeLists.txt │ ├── main.c │ └── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── die │ ├── BUSY │ ├── CMakeLists.txt │ ├── dgui.c │ ├── dgui.h │ ├── die.hxx │ ├── main.c │ └── res │ │ ├── all │ │ ├── cards.png │ │ ├── es_es │ │ │ └── strings.msg │ │ ├── spain.png │ │ ├── strings.msg │ │ └── usa.png │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── fractals │ ├── BUSY │ ├── CMakeLists.txt │ ├── fractals.c │ └── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── hello │ ├── CMakeLists.txt │ ├── main.c │ └── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── hellocpp │ ├── CMakeLists.txt │ ├── main.cpp │ └── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt └── products │ ├── CMakeLists.txt │ ├── prctrl.c │ ├── prctrl.h │ ├── prmenu.c │ ├── prmenu.h │ ├── prmodel.c │ ├── prmodel.h │ ├── products.c │ ├── products.hxx │ ├── prview.c │ ├── prview.h │ └── res │ ├── banner.bmp │ ├── license.txt │ ├── logo.icns │ ├── logo256.ico │ ├── logo48.ico │ ├── pack.txt │ └── res_gui │ ├── about.png │ ├── add.png │ ├── back.png │ ├── back16.png │ ├── back16d.png │ ├── backd.png │ ├── edit.png │ ├── error.png │ ├── es_ES │ └── strings.msg │ ├── exit.png │ ├── first.png │ ├── first16.png │ ├── first16d.png │ ├── firstd.png │ ├── it_IT │ └── strings.msg │ ├── italy.png │ ├── ja_JP │ └── strings.msg │ ├── japan.png │ ├── last.png │ ├── last16.png │ ├── last16d.png │ ├── lastd.png │ ├── login16.png │ ├── logout16.png │ ├── logout16d.png │ ├── minus.png │ ├── next.png │ ├── next16.png │ ├── next16d.png │ ├── nextd.png │ ├── noimage.png │ ├── ok.png │ ├── open.png │ ├── portugal.png │ ├── pt_PT │ └── strings.msg │ ├── ru_RU │ └── strings.msg │ ├── russia.png │ ├── save.png │ ├── saved.png │ ├── settings.png │ ├── settings16.png │ ├── spain.png │ ├── spin.gif │ ├── strings.msg │ ├── usa.png │ ├── user.png │ ├── vi_VN │ └── strings.msg │ └── vietnam.png ├── draw2d ├── BUSY ├── CMakeLists.txt ├── btext.c ├── btext.inl ├── btexth.inl ├── color.c ├── color.h ├── dctx.c ├── dctx.h ├── dctx.inl ├── draw.h ├── draw.inl ├── draw2d.cpp ├── draw2d.h ├── draw2d.hxx ├── draw2d.inl ├── draw2d.ixx ├── draw2dall.h ├── draw2dh.ixx ├── drawg.cpp ├── drawg.h ├── drawg.hpp ├── font.c ├── font.h ├── font.inl ├── gtk3 │ ├── BUSY │ ├── dctx_gtk.c │ ├── dctx_gtk.inl │ ├── draw2d_gtk.c │ ├── draw2d_gtk.ixx │ ├── draw_gtk.inl │ ├── osfont.c │ ├── osfont.inl │ ├── osimage.c │ └── osimage.inl ├── guicontext.c ├── guicontext.inl ├── guicontexth.inl ├── higram.c ├── higram.inl ├── image.c ├── image.h ├── image.inl ├── imgutils.c ├── imgutils.inl ├── osx │ ├── BUSY │ ├── dctx_osx.inl │ ├── dctx_osx.m │ ├── draw2d_osx.inl │ ├── draw2d_osx.ixx │ ├── draw2d_osx.m │ ├── osfont.m │ └── osimage.m ├── palette.c ├── palette.h ├── pixbuf.c ├── pixbuf.h └── win │ ├── BUSY │ ├── dctx_win.cpp │ ├── dctx_win.inl │ ├── draw2d_gdi.ixx │ ├── draw2d_win.cpp │ ├── draw2d_win.inl │ ├── draw2d_win.ixx │ ├── osfont.cpp │ ├── osimage.cpp │ └── osimage.inl ├── geom2d ├── BUSY ├── CMakeLists.txt ├── box2d.cpp ├── box2d.h ├── box2d.hpp ├── cir2d.cpp ├── cir2d.h ├── cir2d.hpp ├── col2d.cpp ├── col2d.h ├── col2d.hpp ├── col2d.ipp ├── geom2d.hxx ├── obb2d.cpp ├── obb2d.h ├── obb2d.hpp ├── obb2d.ipp ├── pol2d.cpp ├── pol2d.h ├── pol2d.hpp ├── pol2d.ipp ├── polabel.cpp ├── polpart.cpp ├── r2d.cpp ├── r2d.h ├── r2d.hpp ├── s2d.cpp ├── s2d.h ├── s2d.hpp ├── seg2d.cpp ├── seg2d.h ├── seg2d.hpp ├── t2d.cpp ├── t2d.h ├── t2d.hpp ├── tri2d.cpp ├── tri2d.h ├── tri2d.hpp ├── v2d.cpp ├── v2d.h └── v2d.hpp ├── gui ├── BUSY ├── CMakeLists.txt ├── button.c ├── button.h ├── button.inl ├── cell.h ├── cell.inl ├── combo.c ├── combo.h ├── combo.inl ├── component.c ├── component.inl ├── comwin.c ├── comwin.h ├── drawctrl.c ├── drawctrl.inl ├── edit.c ├── edit.h ├── edit.inl ├── gbind.c ├── gbind.inl ├── globals.c ├── globals.h ├── gui.cpp ├── gui.h ├── gui.hxx ├── gui.inl ├── gui.ixx ├── guiall.h ├── imageview.c ├── imageview.h ├── label.c ├── label.h ├── label.inl ├── layout.c ├── layout.h ├── layout.inl ├── listbox.c ├── listbox.h ├── listbox.inl ├── menu.c ├── menu.h ├── menu.inl ├── menuitem.c ├── menuitem.h ├── menuitem.inl ├── panel.c ├── panel.h ├── panel.inl ├── popup.c ├── popup.h ├── popup.inl ├── progress.c ├── progress.h ├── progress.inl ├── res │ ├── BUSY │ └── res_assert │ │ ├── BUSY │ │ ├── bomb.png │ │ ├── bomb_dark.png │ │ ├── confused.png │ │ ├── confused_dark.png │ │ ├── logo.png │ │ ├── logo_dark.png │ │ ├── res_assert.c │ │ ├── res_assert.h │ │ └── strings.msg ├── slider.c ├── slider.h ├── slider.inl ├── splitview.c ├── splitview.h ├── splitview.inl ├── tableview.c ├── tableview.h ├── textview.c ├── textview.h ├── textview.inl ├── updown.c ├── updown.h ├── updown.inl ├── view.c ├── view.h ├── view.inl ├── window.c ├── window.h └── window.inl ├── howto ├── col2dhello │ ├── CMakeLists.txt │ ├── col2dgui.c │ ├── col2dgui.h │ ├── col2dhello.c │ ├── col2dhello.hxx │ └── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── drawhello │ ├── CMakeLists.txt │ ├── drawhello.c │ └── res │ │ ├── all │ │ ├── image.jpg │ │ └── image.png │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── drawimg │ ├── CMakeLists.txt │ ├── drawimg.c │ └── res │ │ ├── allres │ │ ├── Monkey.gif │ │ └── zombie.png │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ └── pack.txt ├── guihello │ ├── CMakeLists.txt │ ├── baslayout.c │ ├── baslayout.h │ ├── buttons.c │ ├── buttons.h │ ├── form.c │ ├── form.h │ ├── guibind.c │ ├── guibind.h │ ├── guihello.c │ ├── labels.c │ ├── labels.h │ ├── layoutbind.c │ ├── layoutbind.h │ ├── listboxes.c │ ├── listboxes.h │ ├── multilayout.c │ ├── multilayout.h │ ├── popcom.c │ ├── popcom.h │ ├── res │ │ ├── banner.bmp │ │ ├── license.txt │ │ ├── logo.icns │ │ ├── logo256.ico │ │ ├── logo48.ico │ │ ├── pack.txt │ │ └── res │ │ │ ├── TextView.rtf │ │ │ ├── about.png │ │ │ ├── access.png │ │ │ ├── back.png │ │ │ ├── back16.png │ │ │ ├── back_red.png │ │ │ ├── black.png │ │ │ ├── blue.png │ │ │ ├── building.jpg │ │ │ ├── car.jpg │ │ │ ├── close.png │ │ │ ├── disk12.png │ │ │ ├── disk16.png │ │ │ ├── disk24.png │ │ │ ├── disk32.png │ │ │ ├── disk64.png │ │ │ ├── disk8.png │ │ │ ├── document.png │ │ │ ├── edit16.png │ │ │ ├── edit24.png │ │ │ ├── edit32.png │ │ │ ├── edit64.png │ │ │ ├── error16.png │ │ │ ├── error24.png │ │ │ ├── error32.png │ │ │ ├── error64.png │ │ │ ├── excel.png │ │ │ ├── exit.png │ │ │ ├── first.png │ │ │ ├── first16.png │ │ │ ├── first_red.png │ │ │ ├── folder16.png │ │ │ ├── folder24.png │ │ │ ├── folder32.png │ │ │ ├── folder64.png │ │ │ ├── green.png │ │ │ ├── italy.png │ │ │ ├── japan.png │ │ │ ├── jpg.png │ │ │ ├── laptop.jpg │ │ │ ├── last.png │ │ │ ├── last16.png │ │ │ ├── last_red.png │ │ │ ├── login.png │ │ │ ├── logout.png │ │ │ ├── next.png │ │ │ ├── next16.png │ │ │ ├── next_red.png │ │ │ ├── open.png │ │ │ ├── pdf.png │ │ │ ├── play.png │ │ │ ├── play_red.png │ │ │ ├── plus16.png │ │ │ ├── plus24.png │ │ │ ├── plus32.png │ │ │ ├── plus64.png │ │ │ ├── portugal.png │ │ │ ├── powerpoint.png │ │ │ ├── red.png │ │ │ ├── refresh.png │ │ │ ├── refresh_red.png │ │ │ ├── restore16.png │ │ │ ├── retry.png │ │ │ ├── russia.png │ │ │ ├── save.png │ │ │ ├── search16.png │ │ │ ├── search24.png │ │ │ ├── search32.png │ │ │ ├── search64.png │ │ │ ├── settings.png │ │ │ ├── spain.png │ │ │ ├── strings.msg │ │ │ ├── uking.png │ │ │ ├── vietnam.png │ │ │ ├── warning.png │ │ │ ├── white.png │ │ │ ├── word.png │ │ │ └── yellow.png │ ├── scrollpanel.c │ ├── scrollpanel.h │ ├── sliders.c │ ├── sliders.h │ ├── splits.c │ ├── splits.h │ ├── sublayout.c │ ├── sublayout.h │ ├── subpanel.c │ ├── subpanel.h │ ├── table.c │ ├── table.h │ ├── textviews.c │ └── textviews.h └── urlimg │ ├── CMakeLists.txt │ ├── res │ ├── banner.bmp │ ├── license.txt │ ├── logo.icns │ ├── logo256.ico │ ├── logo48.ico │ └── pack.txt │ └── urlimg.c ├── inet ├── CMakeLists.txt ├── base64.c ├── base64.h ├── httpreq.c ├── httpreq.h ├── inet.cpp ├── inet.h ├── inet.hxx ├── inet.inl ├── inet.ixx ├── json.c ├── json.h ├── linux │ └── oshttpreq.c ├── oshttpreq.inl ├── osx │ └── oshttpreq.m ├── url.c ├── url.h └── win │ └── oshttpreq.c ├── osapp ├── BUSY ├── CMakeLists.txt ├── gtk3 │ ├── BUSY │ ├── osapp_gtk.c │ ├── osapp_gtk.inl │ └── osapp_gtk.ixx ├── nappgui.h ├── osapp.c ├── osapp.h ├── osapp.hxx ├── osapp.inl ├── osapp.ixx ├── osmain.h ├── osmain.hxx ├── osmain_gtk.h ├── osmain_osx.h ├── osmain_win.h ├── osx │ ├── BUSY │ ├── osapp_osx.inl │ └── osapp_osx.m └── win │ ├── BUSY │ ├── osapp_win.c │ ├── osapp_win.inl │ └── osapp_win.ixx ├── osbs ├── BUSY ├── CMakeLists.txt ├── bfile.h ├── bmutex.h ├── bproc.h ├── bsocket.c ├── bsocket.h ├── bthread.h ├── btime.h ├── linux │ ├── BUSY │ └── sinfo.c ├── log.c ├── log.h ├── log.inl ├── osbs.cpp ├── osbs.h ├── osbs.hxx ├── osbs.inl ├── osx │ ├── BUSY │ └── sinfo.m ├── unix │ ├── BUSY │ ├── bfile.c │ ├── bmutex.c │ ├── bproc.c │ ├── bsocket.c │ ├── bthread.c │ ├── btime.c │ └── sinfo.c └── win │ ├── BUSY │ ├── bfile.c │ ├── bmutex.c │ ├── bproc.c │ ├── bsocket.c │ ├── bthread.c │ ├── btime.c │ └── sinfo.c ├── osgui ├── BUSY ├── CMakeLists.txt ├── gtk3 │ ├── BUSY │ ├── osbutton.c │ ├── osbutton.inl │ ├── oscombo.c │ ├── oscombo.inl │ ├── oscomwin.c │ ├── oscomwin.inl │ ├── oscontrol.c │ ├── oscontrol.inl │ ├── osdrawctrl.c │ ├── osedit.c │ ├── osedit.inl │ ├── osglobals.c │ ├── osglobals.inl │ ├── osgui_gtk.c │ ├── osgui_gtk.inl │ ├── osgui_gtk.ixx │ ├── oslabel.c │ ├── oslabel.inl │ ├── oslistener.c │ ├── oslistener.inl │ ├── osmenu.c │ ├── osmenu.inl │ ├── osmenuitem.c │ ├── osmenuitem.inl │ ├── ospanel.c │ ├── ospanel.inl │ ├── ospopup.c │ ├── ospopup.inl │ ├── osprogress.c │ ├── osprogress.inl │ ├── osslider.c │ ├── osslider.inl │ ├── ossplit.c │ ├── ossplit.inl │ ├── ostext.c │ ├── ostext.inl │ ├── osupdown.c │ ├── osupdown.inl │ ├── osview.c │ ├── osview.inl │ ├── oswindow.c │ └── oswindow.inl ├── osbutton.h ├── oscombo.h ├── oscomwin.h ├── osdrawctrl.h ├── osedit.h ├── osglobals.h ├── osgui.cpp ├── osgui.h ├── osgui.hxx ├── osgui.inl ├── osgui.ixx ├── osguictx.c ├── osguictx.h ├── oslabel.h ├── osmenu.h ├── osmenuitem.h ├── ospanel.h ├── ospopup.h ├── osprogress.h ├── osslider.h ├── ossplit.h ├── ostext.h ├── osupdown.h ├── osview.h ├── oswindow.h ├── osx │ ├── BUSY │ ├── osbutton.inl │ ├── osbutton.m │ ├── oscolor.inl │ ├── oscolor.m │ ├── oscombo.inl │ ├── oscombo.m │ ├── oscomwin.inl │ ├── oscomwin.m │ ├── oscontrol.inl │ ├── oscontrol.m │ ├── osdrawctrl.m │ ├── osedit.inl │ ├── osedit.m │ ├── osglobals.inl │ ├── osglobals.m │ ├── osgui_osx.inl │ ├── osgui_osx.ixx │ ├── osgui_osx.m │ ├── oslabel.inl │ ├── oslabel.m │ ├── oslistener.inl │ ├── oslistener.m │ ├── osmenu.m │ ├── osmenuitem.m │ ├── ospanel.inl │ ├── ospanel.m │ ├── ospopup.inl │ ├── ospopup.m │ ├── osprogress.inl │ ├── osprogress.m │ ├── osslider.inl │ ├── osslider.m │ ├── ossplit.m │ ├── ostext.inl │ ├── ostext.m │ ├── osupdown.inl │ ├── osupdown.m │ ├── osview.inl │ ├── osview.m │ ├── oswindow.inl │ └── oswindow.m └── win │ ├── BUSY │ ├── osbutton.c │ ├── osbutton.inl │ ├── oscombo.c │ ├── oscombo.inl │ ├── oscomwin.c │ ├── oscontrol.cpp │ ├── oscontrol.inl │ ├── osdrawctrl.cpp │ ├── osdrawctrl.inl │ ├── osedit.c │ ├── osedit.inl │ ├── osglobals.c │ ├── osgui_win.cpp │ ├── osgui_win.inl │ ├── osgui_win.ixx │ ├── osimglist.c │ ├── osimglist.inl │ ├── oslabel.c │ ├── oslabel.inl │ ├── oslistener.c │ ├── oslistener.inl │ ├── osmenu.c │ ├── osmenu.inl │ ├── osmenuitem.c │ ├── osmenuitem.inl │ ├── ospanel.c │ ├── ospanel.inl │ ├── ospopup.c │ ├── ospopup.inl │ ├── osprogress.c │ ├── osprogress.inl │ ├── osscroll.c │ ├── osscroll.inl │ ├── osslider.c │ ├── osslider.inl │ ├── ossplit.c │ ├── osstyleXP.c │ ├── osstyleXP.inl │ ├── ostext.c │ ├── ostext.inl │ ├── ostooltip.c │ ├── ostooltip.inl │ ├── osupdown.c │ ├── osupdown.inl │ ├── osview.cpp │ ├── osview.inl │ ├── oswindow.c │ └── oswindow.inl ├── sewer ├── BUSY ├── CMakeLists.txt ├── arch.hxx ├── blib.c ├── blib.inl ├── bmath.cpp ├── bmath.h ├── bmath.hpp ├── bmath.inl ├── bmem.c ├── bmem.h ├── bmem.inl ├── bstd.h ├── cassert.c ├── cassert.h ├── config.hxx ├── nowarn.hxx ├── ptr.c ├── ptr.h ├── qsort.c ├── qsort.inl ├── sewer.cpp ├── sewer.h ├── sewer.hxx ├── types.c ├── types.h ├── types.hxx ├── unicode.c ├── unicode.h ├── unix │ ├── BUSY │ ├── bmem_unix.c │ └── bstdimp.c ├── warn.hxx └── win │ ├── BUSY │ ├── bmem_win.c │ └── bstdimp.c └── utils ├── BUSY ├── core.pri ├── nlib ├── BUSY ├── CMakeLists.txt ├── bnfparser.c ├── bnfparser.inl ├── msgparser.c ├── msgparser.inl ├── nglob.c ├── nglob.h ├── nlib.hxx ├── nlib.ixx ├── nrclib.c ├── nrclib.h ├── resgen.c ├── resgen.inl ├── ssh.c └── ssh.h ├── nrc.pro └── nrc ├── BUSY ├── CMakeLists.txt └── nrc.c /BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir src 4 | 5 | # for clients using the shared lib version of nappgui 6 | let use_nappgui* = src.use_nappgui 7 | 8 | # for clients using the static lib version of nappgui 9 | let use_nappgui_static* = src.use_nappgui_static 10 | 11 | # build and use the shared library version of nappgui 12 | let shared_lib* = src.shared_lib 13 | 14 | # build and use the static library version of nappgui 15 | let static_lib* = src.static_lib 16 | 17 | # build and use the nrc utility application of nappgui 18 | let nrc* = src.nrc 19 | 20 | # this is the default build which builds everything 21 | let all! : Group { 22 | .deps = [ 23 | shared_lib 24 | static_lib 25 | nrc 26 | src.demos 27 | ] 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /build/Readme.txt: -------------------------------------------------------------------------------- 1 | The code from https://github.com/rochus-keller/BUSY goes here. 2 | 3 | For more information see the README.md in the root directory. 4 | -------------------------------------------------------------------------------- /prj/build.txt: -------------------------------------------------------------------------------- 1 | 3530 2 | -------------------------------------------------------------------------------- /prj/script/linux/arm/nrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/linux/arm/nrc -------------------------------------------------------------------------------- /prj/script/linux/x64/nrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/linux/x64/nrc -------------------------------------------------------------------------------- /prj/script/linux/x86/nrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/linux/x86/nrc -------------------------------------------------------------------------------- /prj/script/osx/arm64/nrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/osx/arm64/nrc -------------------------------------------------------------------------------- /prj/script/osx/x64/nrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/osx/x64/nrc -------------------------------------------------------------------------------- /prj/script/osx/x86/nrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/osx/x86/nrc -------------------------------------------------------------------------------- /prj/script/win/x64/nrc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/win/x64/nrc.exe -------------------------------------------------------------------------------- /prj/script/win/x86/nrc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/script/win/x86/nrc.exe -------------------------------------------------------------------------------- /prj/templates/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/templates/banner.bmp -------------------------------------------------------------------------------- /prj/templates/cmdmain.c: -------------------------------------------------------------------------------- 1 | /* NAppGUI Console Application */ 2 | 3 | #include "coreall.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | unref(argc); 8 | unref(argv); 9 | core_start(); 10 | bstd_printf("Hello world!\n"); 11 | core_finish(); 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /prj/templates/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/templates/logo.icns -------------------------------------------------------------------------------- /prj/templates/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/templates/logo256.ico -------------------------------------------------------------------------------- /prj/templates/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/prj/templates/logo48.ico -------------------------------------------------------------------------------- /qmake/execute.lua: -------------------------------------------------------------------------------- 1 | os = require "os" 2 | 3 | local cmd = "" 4 | for i = 1,#arg do 5 | cmd = cmd .. arg[i] .. " " 6 | end 7 | os.execute(cmd) 8 | -------------------------------------------------------------------------------- /src/core/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./core.cpp 6 | ./event.cpp 7 | ./array.c 8 | ./bhash.c 9 | ./buffer.c 10 | ./clock.c 11 | ./date.c 12 | ./dbind.c 13 | ./heap.c 14 | ./hfile.c 15 | ./keybuf.c 16 | ./lex.c 17 | ./nfa.c 18 | ./obj.c 19 | ./rbtree.c 20 | ./regex.c 21 | ./respack.c 22 | ./stream.c 23 | ./strings.c 24 | ./tfilter.c 25 | ] 26 | .configs += ^main_config 27 | } 28 | -------------------------------------------------------------------------------- /src/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(core "osbs") -------------------------------------------------------------------------------- /src/core/bhash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bhash.h 8 | * 9 | */ 10 | 11 | /* Hash code from memory block */ 12 | 13 | #include "core.hxx" 14 | 15 | __EXTERN_C 16 | 17 | uint32_t bhash_from_block(const byte_t *data, const uint32_t size); 18 | 19 | uint32_t bhash_append_uint32(const uint32_t hash, const uint32_t value); 20 | 21 | uint32_t bhash_append_real32(const uint32_t hash, const real32_t value); 22 | 23 | __END_C 24 | 25 | #define bhash_from_object(data, type)\ 26 | ((void)((type*)(data) == (data)),\ 27 | bhash_from_block((const byte_t*)(data), sizeof(type))) 28 | 29 | #define bhash_append_enum(hash, value, type)\ 30 | ((void)((enum type)value == value),\ 31 | bhash_append_uint32(hash, (uint32_t)value)) 32 | 33 | -------------------------------------------------------------------------------- /src/core/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: buffer.h 8 | * https://nappgui.com/en/core/buffer.html 9 | * 10 | */ 11 | 12 | /* Fixed size memory buffers */ 13 | 14 | #include "core.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Buffer *buffer_create(const uint32_t size); 19 | 20 | void buffer_destroy(Buffer **buffer); 21 | 22 | uint32_t buffer_size(const Buffer *buffer); 23 | 24 | byte_t *buffer_data(Buffer *buffer); 25 | 26 | __END_C 27 | 28 | -------------------------------------------------------------------------------- /src/core/clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: clock.h 8 | * https://nappgui.com/en/core/clock.html 9 | * 10 | */ 11 | 12 | /* Clock (Frame counter) */ 13 | 14 | #include "core.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Clock *clock_create(const real64_t interval); 19 | 20 | void clock_destroy(Clock **clk); 21 | 22 | bool_t clock_frame(Clock *clk, real64_t *prev_frame, real64_t *curr_frame); 23 | 24 | void clock_reset(Clock *clk); 25 | 26 | real64_t clock_elapsed(const Clock *clk); 27 | 28 | __END_C 29 | -------------------------------------------------------------------------------- /src/core/core.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: core.h 8 | * https://nappgui.com/en/core/core.html 9 | * 10 | */ 11 | 12 | /* Core library */ 13 | 14 | #include "core.hxx" 15 | 16 | __EXTERN_C 17 | 18 | void core_start(void); 19 | 20 | void core_finish(void); 21 | 22 | __END_C 23 | -------------------------------------------------------------------------------- /src/core/core.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: core.inl 8 | * 9 | */ 10 | 11 | /* Core library */ 12 | 13 | #include "core.hxx" 14 | 15 | __EXTERN_C 16 | 17 | __END_C 18 | -------------------------------------------------------------------------------- /src/core/event.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: event.inl 8 | * 9 | */ 10 | 11 | /* Events */ 12 | 13 | #include "core.ixx" 14 | 15 | __EXTERN_C 16 | 17 | Listener *listener_copy(const Listener *listener); 18 | 19 | void listener_retain(Listener *listener, FPtr_retain func_retain, FPtr_release func_release); 20 | 21 | __END_C 22 | -------------------------------------------------------------------------------- /src/core/heap.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: heap.inl 8 | * 9 | */ 10 | 11 | /* Basic memory system */ 12 | 13 | #include "config.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void _heap_start(void); 18 | 19 | void _heap_finish(void); 20 | 21 | void _heap_page_size(const uint32_t size); 22 | 23 | void _heap_verbose(const bool_t verbose); 24 | 25 | __END_C 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/core/hfile.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: hfile.inl 8 | * 9 | */ 10 | 11 | /* High-level file operations */ 12 | 13 | #include "core.hxx" 14 | 15 | __EXTERN_C 16 | 17 | String *hfile_exename(void); 18 | 19 | String *hfile_home_dir(const char_t *path); 20 | 21 | String *hfile_build_dir(const char_t *dir, const char_t *target); 22 | 23 | String *hfile_src_dir(const char_t *file); 24 | 25 | String *hfile_root_dir(const char_t *file); 26 | 27 | __END_C 28 | -------------------------------------------------------------------------------- /src/core/keybuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: keybuf.h 8 | * https://nappgui.com/en/core/keybuf.html 9 | * 10 | */ 11 | 12 | /* Keyboard buffer */ 13 | 14 | #include "core.hxx" 15 | 16 | __EXTERN_C 17 | 18 | KeyBuf *keybuf_create(void); 19 | 20 | void keybuf_destroy(KeyBuf **buffer); 21 | 22 | void keybuf_OnUp(KeyBuf *buffer, const vkey_t key); 23 | 24 | void keybuf_OnDown(KeyBuf *buffer, const vkey_t key); 25 | 26 | void keybuf_clear(KeyBuf *buffer); 27 | 28 | bool_t keybuf_pressed(const KeyBuf *buffer, const vkey_t key); 29 | 30 | const char_t* keybuf_str(const vkey_t key); 31 | 32 | void keybuf_dump(const KeyBuf *buffer); 33 | 34 | __END_C 35 | -------------------------------------------------------------------------------- /src/core/lex.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: lex.inl 8 | * 9 | */ 10 | 11 | /* Lexical scanner */ 12 | 13 | #include "core.ixx" 14 | 15 | __EXTERN_C 16 | 17 | LexScn *lexscn_create(void); 18 | 19 | void lexscn_destroy(LexScn **lex); 20 | 21 | void lexscn_spaces(LexScn *lex, const bool_t activate); 22 | 23 | void lexscn_newlines(LexScn *lex, const bool_t activate); 24 | 25 | void lexscn_escapes(LexScn *lex, const bool_t activate); 26 | 27 | void lexscn_comments(LexScn *lex, const bool_t activate); 28 | 29 | ltoken_t lexscn_token(LexScn *lex, Stream *stm); 30 | 31 | uint32_t lexscn_row(const LexScn *lex); 32 | 33 | uint32_t lexscn_col(const LexScn *lex); 34 | 35 | const char_t *lexscn_lexeme(const LexScn *lex, uint32_t *size); 36 | 37 | const char_t *lexscn_string(const ltoken_t token); 38 | 39 | __END_C 40 | -------------------------------------------------------------------------------- /src/core/nfa.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: nfa.inl 8 | * 9 | */ 10 | 11 | /* Non-deterministic finite automata */ 12 | 13 | #include "core.ixx" 14 | 15 | __EXTERN_C 16 | 17 | NFA *nfa_string(const char_t *str); 18 | 19 | NFA *nfa_regex(const char_t *regex, const bool_t verbose); 20 | 21 | void nfa_destroy(NFA **nfa); 22 | 23 | void nfa_start(NFA *nfa); 24 | 25 | bool_t nfa_next(NFA *nfa, const uint32_t codepoint); 26 | 27 | bool_t nfa_accept(NFA *nfa); 28 | 29 | __END_C 30 | 31 | -------------------------------------------------------------------------------- /src/core/regex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: regex.h 8 | * https://nappgui.com/en/core/regex.html 9 | * 10 | */ 11 | 12 | /* Regular expresions */ 13 | 14 | #include "core.hxx" 15 | 16 | __EXTERN_C 17 | 18 | RegEx *regex_create(const char_t *pattern); 19 | 20 | void regex_destroy(RegEx **regex); 21 | 22 | bool_t regex_match(const RegEx *regex, const char_t *str); 23 | 24 | __END_C 25 | -------------------------------------------------------------------------------- /src/core/respack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: respack.h 8 | * https://nappgui.com/en/core/respack.html 9 | * 10 | */ 11 | 12 | /* Resource Packages */ 13 | 14 | #include "core.hxx" 15 | 16 | __EXTERN_C 17 | 18 | void respack_destroy(ResPack **pack); 19 | 20 | const char_t *respack_text(const ResPack *pack, const ResId id); 21 | 22 | const byte_t *respack_file(const ResPack *pack, const ResId id, uint32_t *size); 23 | 24 | __END_C 25 | -------------------------------------------------------------------------------- /src/core/respackh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: respackh.h 8 | * 9 | */ 10 | 11 | /* Resource Packages */ 12 | 13 | #include "core.hxx" 14 | 15 | __EXTERN_C 16 | 17 | ResPack *respack_embedded(const char_t *name); 18 | 19 | ResPack *respack_packed(const char_t *name, const char_t *locale); 20 | 21 | void respack_add_msg(ResPack *pack, const char_t *msg); 22 | 23 | void respack_add_cdata(ResPack *pack, const uint32_t type, const byte_t *data, const uint32_t data_size); 24 | 25 | __END_C 26 | 27 | -------------------------------------------------------------------------------- /src/core/stream.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: stream.inl 8 | * 9 | */ 10 | 11 | /* Data streams */ 12 | 13 | #include "core.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _stm_start(void); 18 | 19 | void _stm_finish(void); 20 | 21 | void _stm_restore(Stream *stm, const byte_t *data, const uint32_t size); 22 | 23 | void _stm_restore_col(Stream *stm, const uint32_t col); 24 | 25 | void _stm_restore_row(Stream *stm, const uint32_t row); 26 | 27 | bool_t _stm_memory(const Stream *stm); 28 | 29 | uint32_t _stm_get_roffset(const Stream *stm); 30 | 31 | void _stm_set_roffset(Stream *stm, const uint32_t offset); 32 | 33 | __END_C 34 | 35 | -------------------------------------------------------------------------------- /src/core/tfilter.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: tfilter.inl 8 | * 9 | */ 10 | 11 | /* Text filters */ 12 | 13 | #include "core.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void tfilter_number(const char_t *src, char_t *dest, const uint32_t size, const uint32_t num_decimals, const bool_t allow_negatives); 18 | 19 | __END_C 20 | -------------------------------------------------------------------------------- /src/demo/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir bode 4 | subdir fractals 5 | subdir casino # to just create the build directory used by die 6 | subdir die 7 | 8 | let apps * : Group { 9 | .deps = [ 10 | bode.bode 11 | fractals.fractals 12 | die.die 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/demo/bode/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let bode * : Executable { 4 | .sources = [ 5 | ./bdcalc.c 6 | ./bdctrl.c 7 | ./bdmodel.c 8 | ./bdplot.c 9 | ./bdview.c 10 | ./bode.c 11 | ] 12 | .deps += ^static_lib ; 13 | .configs += ^use_nappgui_static 14 | } 15 | -------------------------------------------------------------------------------- /src/demo/bode/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(Bode "") -------------------------------------------------------------------------------- /src/demo/bode/bdcalc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bdcalc.h 8 | * 9 | */ 10 | 11 | /* Bode Algorithm */ 12 | 13 | #include "geom2d.hxx" 14 | 15 | void bode_set_P_coeffs(const real32_t *p); 16 | 17 | void bode_set_Q_coeffs(const real32_t *q); 18 | 19 | void bode_set_K(const real32_t *k); 20 | 21 | void bode_set_T(const real32_t t); 22 | 23 | void bode_set_R(const real32_t r); 24 | 25 | void bode_update(uint32_t *last_sim_i); 26 | 27 | uint32_t bode_npoints(void); 28 | 29 | void bode_db_graph(V2Df *v2d, const uint32_t n); 30 | 31 | void bode_phase_graph(V2Df *v2d, const uint32_t n); 32 | 33 | uint32_t bode_sim_npoints(void); 34 | 35 | void bode_sim_graph(V2Df *v2d, const uint32_t n); 36 | -------------------------------------------------------------------------------- /src/demo/bode/bdctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bdctrl.h 8 | * 9 | */ 10 | 11 | /* Bode Ctrl */ 12 | 13 | #include "bode.hxx" 14 | 15 | Ctrl* ctrl_create(Model *model, Plot *plot); 16 | 17 | void ctrl_destroy(Ctrl **ctrl); 18 | 19 | void ctrl_layout(Ctrl *ctrl, Layout *layout); 20 | 21 | void ctrl_reset(Ctrl *ctrl, Button *button); 22 | 23 | void ctrl_take(Ctrl *ctrl, Cell *cell); 24 | 25 | void ctrl_restore(Ctrl *ctrl, Cell *cell); 26 | 27 | void ctrl_clear(Ctrl *ctrl, Cell *cell); 28 | 29 | void ctrl_info(Ctrl *ctrl, Button *button); 30 | 31 | void ctrl_view1(Ctrl *ctrl, View *view); 32 | 33 | void ctrl_view2(Ctrl *ctrl, View *view); 34 | 35 | void ctrl_slider1(Ctrl *ctrl, Cell *cell); 36 | 37 | void ctrl_run(Ctrl *ctrl); 38 | 39 | void ctrl_OnModelChange(Ctrl *ctrl, Event *e); 40 | -------------------------------------------------------------------------------- /src/demo/bode/bdmodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bdmodel.h 8 | * 9 | */ 10 | 11 | /* Bode Model */ 12 | 13 | #include "bode.hxx" 14 | 15 | void model_dbind(void); 16 | 17 | void model_default(Model *model); 18 | 19 | Model *model_read(void); 20 | 21 | void model_save(Model *model, Window *window); 22 | 23 | bool_t model_validate(Model *model); 24 | -------------------------------------------------------------------------------- /src/demo/bode/bdplot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bdplot.h 8 | * 9 | */ 10 | 11 | /* Bode plot drawing */ 12 | 13 | #include "bode.hxx" 14 | 15 | Plot *plot_create(const uint32_t npoints, const uint32_t simulation_npoints); 16 | 17 | void plot_destroy(Plot **plot); 18 | 19 | void plot_update(Plot *plot, const real32_t T, const uint32_t last_sim_i); 20 | 21 | void plot_take_snap(Plot *plot); 22 | 23 | void plot_restore_snap(Plot *plot); 24 | 25 | void plot_clear_snap(Plot *plot); 26 | 27 | void plot_mouse1_x(Plot *plot, const real32_t x); 28 | 29 | void plot_mouse2_x(Plot *plot, const real32_t x); 30 | 31 | void plot_draw_graph1(Plot *plot, DCtx *ctx, const real32_t width, const real32_t height); 32 | 33 | void plot_draw_graph2(Plot *plot, DCtx *ctx, const real32_t width, const real32_t height); 34 | -------------------------------------------------------------------------------- /src/demo/bode/bdview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bdview.h 8 | * 9 | */ 10 | 11 | /* Bode View */ 12 | 13 | #include "bode.hxx" 14 | 15 | Window* bdview_create(Ctrl *ctrl); 16 | -------------------------------------------------------------------------------- /src/demo/bode/bode.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bode.hxx 8 | * 9 | */ 10 | 11 | /* Bode Types */ 12 | 13 | #ifndef __TYPES_HXX__ 14 | #define __TYPES_HXX__ 15 | 16 | #include "gui.hxx" 17 | 18 | typedef struct _params_t Params; 19 | typedef struct _model_t Model; 20 | typedef struct _plot_t Plot; 21 | typedef struct _ctrl_t Ctrl; 22 | 23 | struct _params_t 24 | { 25 | real32_t P[5]; 26 | real32_t Q[9]; 27 | real32_t K[3]; 28 | real32_t T; 29 | real32_t R; 30 | real32_t KRg[6]; 31 | }; 32 | 33 | struct _model_t 34 | { 35 | V2Df wpos; 36 | S2Df wsize; 37 | Params cparams; 38 | Params sparams; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/demo/bode/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bode/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/bode/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/bode/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bode/res/logo.icns -------------------------------------------------------------------------------- /src/demo/bode/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bode/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/bode/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bode/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/bode/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Bode plot diagram 4 | -------------------------------------------------------------------------------- /src/demo/bricks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(Bricks "") -------------------------------------------------------------------------------- /src/demo/bricks/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bricks/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/bricks/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/bricks/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bricks/res/logo.icns -------------------------------------------------------------------------------- /src/demo/bricks/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bricks/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/bricks/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/bricks/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/bricks/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Write here the application description 4 | -------------------------------------------------------------------------------- /src/demo/casino/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/demo/casino/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(casino "draw2d") -------------------------------------------------------------------------------- /src/demo/casino/casino.c: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: casino.c 8 | * 9 | */ 10 | 11 | /* casino */ 12 | 13 | #include "casino.h" 14 | 15 | /*---------------------------------------------------------------------------*/ 16 | 17 | void casino_start(void) 18 | { 19 | /*TODO: Implement library initialization code here */ 20 | } 21 | 22 | /*---------------------------------------------------------------------------*/ 23 | 24 | void casino_finish(void) 25 | { 26 | /*TODO: Implement library ending code here */ 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/demo/casino/casino.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: casino.h 8 | * 9 | */ 10 | 11 | /* casino */ 12 | 13 | #include "casino.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void casino_start(void); 18 | 19 | void casino_finish(void); 20 | 21 | __END_C 22 | -------------------------------------------------------------------------------- /src/demo/casino/casino.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: casino.hxx 8 | * 9 | */ 10 | 11 | /* casino */ 12 | 13 | #ifndef __CASINO_HXX__ 14 | #define __CASINO_HXX__ 15 | 16 | #include "draw2d.hxx" 17 | 18 | /* TODO: Define data types here */ 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/demo/casino/ddraw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ddraw.h 8 | * 9 | */ 10 | 11 | /* Die drawing */ 12 | 13 | #include "casino.hxx" 14 | 15 | void die_draw( 16 | DCtx *ctx, 17 | const real32_t x, 18 | const real32_t y, 19 | const real32_t width, 20 | const real32_t height, 21 | const real32_t padding, 22 | const real32_t corner, 23 | const real32_t radius, 24 | const uint32_t face); 25 | -------------------------------------------------------------------------------- /src/demo/dice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(Dice "demo/casino") -------------------------------------------------------------------------------- /src/demo/dice/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/dice/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/dice/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/dice/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/dice/res/logo.icns -------------------------------------------------------------------------------- /src/demo/dice/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/dice/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/dice/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/dice/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/dice/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Write here the application description 4 | -------------------------------------------------------------------------------- /src/demo/die/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let nrc : LuaScript { 4 | .script = root_source_dir + ./qmake/execute.lua 5 | .args += [ 6 | tostring( root_build_dir + relpath() + ../../nrc ) 7 | "-dc" 8 | tostring(abspath( ./res/all )) 9 | tostring( root_build_dir + relpath() + ./all.c ) 10 | ] 11 | } 12 | 13 | let die * : Executable { 14 | let dir = root_build_dir + relpath() 15 | .sources = [ 16 | ./main.c 17 | ./dgui.c 18 | ../casino/ddraw.c 19 | dir + ./all.c 20 | ] 21 | .include_dirs += [ dir ../casino ] 22 | .deps = [ ^static_lib nrc ] 23 | .configs += ^use_nappgui_static 24 | } 25 | -------------------------------------------------------------------------------- /src/demo/die/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(Die "demo/casino") -------------------------------------------------------------------------------- /src/demo/die/dgui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: dgui.h 8 | * 9 | */ 10 | 11 | /* Die Gui */ 12 | 13 | #include "die.hxx" 14 | 15 | __EXTERN_C 16 | 17 | Window *dgui_window(App *app); 18 | 19 | __END_C -------------------------------------------------------------------------------- /src/demo/die/die.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: die.hxx 8 | * 9 | */ 10 | 11 | /* Die Types */ 12 | 13 | #ifndef __DIE_HXX__ 14 | #define __DIE_HXX__ 15 | 16 | #include "gui.hxx" 17 | 18 | typedef struct _app_t App; 19 | 20 | struct _app_t 21 | { 22 | real32_t padding; 23 | real32_t corner; 24 | real32_t radius; 25 | uint32_t face; 26 | View *view; 27 | Window *window; 28 | }; 29 | 30 | #endif -------------------------------------------------------------------------------- /src/demo/die/res/all/cards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/die/res/all/cards.png -------------------------------------------------------------------------------- /src/demo/die/res/all/es_es/strings.msg: -------------------------------------------------------------------------------- 1 | /* Die strings */ 2 | TEXT_FACE Cara 3 | TEXT_PADDING Margen 4 | TEXT_CORNER Borde 5 | TEXT_RADIUS Radio 6 | TEXT_ONE Uno 7 | TEXT_TWO Dos 8 | TEXT_THREE Tres 9 | TEXT_FOUR Cuatro 10 | TEXT_FIVE Cinco 11 | TEXT_SIX Seis 12 | TEXT_TITLE Simulador de dado 13 | TEXT_INFO Mueve los sliders para cambiar la representación paramétrica de la cara del dado. 14 | TEXT_LANG Idioma 15 | TEXT_ENGLISH Inglés 16 | TEXT_SPANISH Español 17 | -------------------------------------------------------------------------------- /src/demo/die/res/all/spain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/die/res/all/spain.png -------------------------------------------------------------------------------- /src/demo/die/res/all/strings.msg: -------------------------------------------------------------------------------- 1 | /* Die strings */ 2 | TEXT_FACE Face 3 | TEXT_PADDING Padding 4 | TEXT_CORNER Corner 5 | TEXT_RADIUS Radius 6 | TEXT_ONE One 7 | TEXT_TWO Two 8 | TEXT_THREE Three 9 | TEXT_FOUR Four 10 | TEXT_FIVE Five 11 | TEXT_SIX Six 12 | TEXT_TITLE Die Simulator 13 | TEXT_INFO Move the sliders to change the parametric representation of the die face. 14 | TEXT_LANG Language 15 | TEXT_ENGLISH English 16 | TEXT_SPANISH Spanish 17 | -------------------------------------------------------------------------------- /src/demo/die/res/all/usa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/die/res/all/usa.png -------------------------------------------------------------------------------- /src/demo/die/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/die/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/die/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/die/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/die/res/logo.icns -------------------------------------------------------------------------------- /src/demo/die/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/die/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/die/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/die/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/die/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Die Face Drawing. 4 | 5 | -------------------------------------------------------------------------------- /src/demo/fractals/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let fractals * : Executable { 4 | .sources = [ 5 | ./fractals.c 6 | ] 7 | .deps += ^static_lib; 8 | .configs += ^use_nappgui_static 9 | } 10 | -------------------------------------------------------------------------------- /src/demo/fractals/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(Fractals "") -------------------------------------------------------------------------------- /src/demo/fractals/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/fractals/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/fractals/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/fractals/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/fractals/res/logo.icns -------------------------------------------------------------------------------- /src/demo/fractals/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/fractals/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/fractals/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/fractals/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/fractals/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Write here the application description 4 | -------------------------------------------------------------------------------- /src/demo/hello/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(HelloWorld "") -------------------------------------------------------------------------------- /src/demo/hello/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hello/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/hello/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/hello/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hello/res/logo.icns -------------------------------------------------------------------------------- /src/demo/hello/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hello/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/hello/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hello/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/hello/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=HelloWorld program for NAppGUI SDK. 4 | 5 | -------------------------------------------------------------------------------- /src/demo/hellocpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(HelloCpp "") -------------------------------------------------------------------------------- /src/demo/hellocpp/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hellocpp/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/hellocpp/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/hellocpp/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hellocpp/res/logo.icns -------------------------------------------------------------------------------- /src/demo/hellocpp/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hellocpp/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/hellocpp/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/hellocpp/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/hellocpp/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=HelloWorld program for NAppGUI SDK. 4 | 5 | -------------------------------------------------------------------------------- /src/demo/products/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(Products "inet") -------------------------------------------------------------------------------- /src/demo/products/prmenu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: prmenu.h 8 | * 9 | */ 10 | 11 | /* Products Menu */ 12 | 13 | #include "products.hxx" 14 | 15 | Menu *prmenu_create(Ctrl *ctrl); 16 | -------------------------------------------------------------------------------- /src/demo/products/products.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: products.hxx 8 | * 9 | */ 10 | 11 | /* Products Types */ 12 | 13 | #ifndef __TYPES_HXX__ 14 | #define __TYPES_HXX__ 15 | 16 | #include "gui.hxx" 17 | 18 | typedef enum _wserv_t 19 | { 20 | ekWS_CONNECT = 1, 21 | ekWS_JSON, 22 | ekWS_ACCESS, 23 | ekWS_OK 24 | } wserv_t; 25 | 26 | typedef struct _model_t Model; 27 | typedef struct _product_t Product; 28 | typedef struct _ctrl_t Ctrl; 29 | 30 | __EXTERN_C 31 | 32 | extern color_t kHOLDER; 33 | extern color_t kEDITBG; 34 | extern color_t kSTATBG; 35 | extern color_t kSTATSK; 36 | extern color_t kTXTRED; 37 | 38 | __END_C 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /src/demo/products/prview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: prview.h 8 | * 9 | */ 10 | 11 | /* Products View */ 12 | 13 | #include "products.hxx" 14 | 15 | Window *prview_create(Ctrl *ctrl); 16 | -------------------------------------------------------------------------------- /src/demo/products/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/banner.bmp -------------------------------------------------------------------------------- /src/demo/products/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/demo/products/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/logo.icns -------------------------------------------------------------------------------- /src/demo/products/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/logo256.ico -------------------------------------------------------------------------------- /src/demo/products/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/logo48.ico -------------------------------------------------------------------------------- /src/demo/products/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=JSON based client application. 4 | 5 | -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/about.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/add.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/back.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/back16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/back16.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/back16d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/back16d.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/backd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/backd.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/edit.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/error.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/exit.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/first.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/first16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/first16.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/first16d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/first16d.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/firstd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/firstd.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/italy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/italy.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/japan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/japan.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/last.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/last16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/last16.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/last16d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/last16d.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/lastd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/lastd.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/login16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/login16.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/logout16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/logout16.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/logout16d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/logout16d.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/minus.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/next.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/next16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/next16.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/next16d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/next16d.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/nextd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/nextd.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/noimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/noimage.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/ok.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/open.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/portugal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/portugal.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/russia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/russia.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/save.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/saved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/saved.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/settings.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/settings16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/settings16.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/spain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/spain.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/spin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/spin.gif -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/usa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/usa.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/user.png -------------------------------------------------------------------------------- /src/demo/products/res/res_gui/vietnam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/demo/products/res/res_gui/vietnam.png -------------------------------------------------------------------------------- /src/draw2d/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir gtk3 4 | subdir osx 5 | subdir win 6 | 7 | let sources * : SourceSet { 8 | .sources = [ 9 | ./draw2d.cpp 10 | ./drawg.cpp 11 | ./btext.c 12 | ./color.c 13 | ./dctx.c 14 | ./font.c 15 | ./guicontext.c 16 | ./higram.c 17 | ./image.c 18 | ./imgutils.c 19 | ./palette.c 20 | ./pixbuf.c 21 | ] 22 | .configs += ^main_config 23 | 24 | if target_os == `linux { 25 | .deps += gtk3.sources 26 | }else if target_os == `win32 { 27 | .deps += win.sources 28 | }else if target_os == `macos { 29 | .deps += osx.sources 30 | }else { 31 | error("target os not supported") 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/draw2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(draw2d "geom2d") -------------------------------------------------------------------------------- /src/draw2d/btext.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: btext.inl 8 | * 9 | */ 10 | 11 | /* Attributed strings */ 12 | 13 | #include "draw2d.ixx" 14 | 15 | __EXTERN_C 16 | 17 | //void astr_slices_bounds(AString *astr, DCtx *ctx); 18 | // 19 | //void astr_bounds(const AString *astr, const real32_t refwidth, real32_t *width, real32_t *height); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/draw2d/dctx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: dctx.h 8 | * https://nappgui.com/en/draw2d/dctx.html 9 | * 10 | */ 11 | 12 | /* Draw context */ 13 | 14 | #include "draw2d.hxx" 15 | 16 | __EXTERN_C 17 | 18 | DCtx *dctx_bitmap(const uint32_t width, const uint32_t height, const pixformat_t format); 19 | 20 | Image *dctx_image(DCtx **ctx); 21 | 22 | void draw_clear(DCtx *ctx, const color_t color); 23 | 24 | void draw_matrixf(DCtx *ctx, const T2Df *t2d); 25 | 26 | void draw_matrixd(DCtx *ctx, const T2Dd *t2d); 27 | 28 | void draw_matrix_cartesianf(DCtx *ctx, const T2Df *t2d); 29 | 30 | void draw_matrix_cartesiand(DCtx *ctx, const T2Dd *t2d); 31 | 32 | void draw_antialias(DCtx *ctx, const bool_t on); 33 | 34 | __END_C 35 | 36 | -------------------------------------------------------------------------------- /src/draw2d/dctx.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: dctx.inl 8 | * 9 | */ 10 | 11 | /* Draw context */ 12 | 13 | #include "draw2d.hxx" 14 | 15 | __EXTERN_C 16 | 17 | DCtx *dctx_create(void *custom_data); 18 | 19 | void dctx_destroy(DCtx **ctx); 20 | 21 | void dctx_init(DCtx *ctx); 22 | 23 | void dctx_set_gcontext(DCtx *ctx, void *gcontext, const uint32_t width, const uint32_t height, const real32_t offset_x, const real32_t offset_y, const uint32_t background, const bool_t reset); 24 | 25 | void dctx_unset_gcontext(DCtx *ctx); 26 | 27 | void dctx_size(const DCtx *ctx, uint32_t *width, uint32_t *height); 28 | 29 | void dctx_transform(DCtx *ctx, const T2Df *t2d, const bool_t cartesian); 30 | 31 | __END_C 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/draw2d/draw.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: draw.inl 8 | * 9 | */ 10 | 11 | /* Drawing commands */ 12 | 13 | #include "draw2d.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void drawimp_alloc_globals(void); 18 | 19 | void drawimp_dealloc_globals(void); 20 | 21 | void draw_imgimp(DCtx *ctx, const OSImage *image, const uint32_t frame_index, const real32_t x, const real32_t y, const bool_t raster); 22 | 23 | __END_C 24 | -------------------------------------------------------------------------------- /src/draw2d/draw2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: draw2d.h 8 | * https://nappgui.com/en/draw2d/draw2d.html 9 | * 10 | */ 11 | 12 | /* Operating system 2D drawing support */ 13 | 14 | #include "draw2d.hxx" 15 | 16 | __EXTERN_C 17 | 18 | void draw2d_start(void); 19 | 20 | void draw2d_finish(void); 21 | 22 | #define resid_image(resid) (const Image*)(resid) 23 | 24 | __END_C 25 | -------------------------------------------------------------------------------- /src/draw2d/draw2dall.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: draw2dall.h 8 | * 9 | */ 10 | 11 | /* All-in-one osdraw headers include */ 12 | 13 | #include "coreall.h" 14 | 15 | /* geom2d */ 16 | #include "v2d.h" 17 | #include "s2d.h" 18 | #include "r2d.h" 19 | #include "t2d.h" 20 | #include "seg2d.h" 21 | #include "cir2d.h" 22 | #include "box2d.h" 23 | #include "obb2d.h" 24 | #include "tri2d.h" 25 | #include "pol2d.h" 26 | #include "col2d.h" 27 | 28 | /* draw2d */ 29 | #include "draw2d.h" 30 | #include "color.h" 31 | #include "dctx.h" 32 | #include "draw.h" 33 | #include "drawg.h" 34 | #include "font.h" 35 | #include "image.h" 36 | #include "pixbuf.h" 37 | #include "palette.h" 38 | 39 | -------------------------------------------------------------------------------- /src/draw2d/font.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: font.inl 8 | * 9 | */ 10 | 11 | /* Fonts */ 12 | 13 | #include "draw2d.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void osfont_alloc_globals(void); 18 | 19 | void osfont_dealloc_globals(void); 20 | 21 | OSFont *osfont_create(const char_t *family, const real32_t size, const uint32_t style); 22 | 23 | void osfont_destroy(OSFont **font); 24 | 25 | const char_t *osfont_family(const char_t *family); 26 | 27 | void *font_native(const Font *font); 28 | 29 | real32_t font_height(const Font *font); 30 | 31 | real32_t font_internal_leading(const Font *font); 32 | 33 | void osfont_metrics(const OSFont *font, real32_t *internal_leading, real32_t *cell_size); 34 | 35 | void osfont_extents(const OSFont *font, const char_t *text, const real32_t refwidth, real32_t *width, real32_t *height); 36 | 37 | __END_C 38 | 39 | -------------------------------------------------------------------------------- /src/draw2d/gtk3/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./dctx_gtk.c 6 | ./draw2d_gtk.c 7 | ./osfont.c 8 | ./osimage.c 9 | ] 10 | .configs += [ ^main_config ^gtk_config ] 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/draw2d/gtk3/draw_gtk.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: draw_gtk.inl 8 | * 9 | */ 10 | 11 | /* Drawing commands */ 12 | 13 | #include "draw2d.ixx" 14 | //#include 15 | 16 | __EXTERN_C 17 | 18 | void drawimp_raster_mode(DCtx *ctx); 19 | 20 | void drawimp_begin_text(DCtx *ctx, const char_t *text, const real32_t x, const real32_t y); 21 | 22 | void drawimp_color(cairo_t *cairo, const color_t color, color_t *source_color); 23 | 24 | void drawimp_draw(DCtx *ctx, const drawop_t op); 25 | 26 | __END_C 27 | 28 | -------------------------------------------------------------------------------- /src/draw2d/gtk3/osfont.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osfont.inl 8 | * 9 | */ 10 | 11 | /* OSFont support */ 12 | 13 | #include "draw2d_gtk.ixx" 14 | 15 | void osfont_set_default(const PangoFontDescription *fdesc); 16 | 17 | real32_t osfont_device_to_pixels(void); 18 | 19 | -------------------------------------------------------------------------------- /src/draw2d/gtk3/osimage.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osimage.inl 8 | * 9 | */ 10 | 11 | /* Images */ 12 | 13 | #include "draw2d.ixx" 14 | #include 15 | 16 | __EXTERN_C 17 | 18 | GdkPixbuf *osimage_pixbuf(OSImage *image); 19 | 20 | __END_C 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/draw2d/guicontexth.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: guicontexth.inl 8 | * 9 | */ 10 | 11 | /* Gui rendering context */ 12 | 13 | #include "draw2d.hxx" 14 | #include "draw2dh.ixx" 15 | 16 | __EXTERN_C 17 | 18 | GuiContext *gui_context_retain(const GuiContext *context); 19 | 20 | void gui_context_release(GuiContext **context); 21 | 22 | void gui_context_destroy(GuiContext **context); 23 | 24 | void gui_context_set_current(const GuiContext *context); 25 | 26 | const GuiContext *gui_context_get_current(void); 27 | 28 | __END_C 29 | -------------------------------------------------------------------------------- /src/draw2d/osx/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./dctx_osx.m 6 | ./draw2d_osx.m 7 | ./osfont.m 8 | ./osimage.m 9 | ] 10 | .configs += [ ^main_config ^osx_config ] 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/draw2d/osx/dctx_osx.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: dctx_osx.inl 8 | * 9 | */ 10 | 11 | /* Draw context */ 12 | 13 | void _dctx_gradient_transform(DCtx *ctx); 14 | 15 | NSTextAlignment dctx_text_alignment(const align_t halign); 16 | 17 | -------------------------------------------------------------------------------- /src/draw2d/osx/draw2d_osx.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: draw2d_osx.inl 8 | * 9 | */ 10 | 11 | /* Draw */ 12 | 13 | void draw_raster_mode(DCtx *ctx); 14 | 15 | void draw_shape_fill_color(DCtx *ctx, const color_t color); 16 | 17 | void draw_text_wrap(DCtx *ctx, const ellipsis_t ellipsis); 18 | 19 | NSString *drawctrl_begin_text(DCtx *ctx, const char_t *text, const real32_t x, const real32_t y, NSRect *rect); 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/draw2d/win/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./dctx_win.cpp 6 | ./draw2d_win.cpp 7 | ./osfont.cpp 8 | ./osimage.cpp 9 | ] 10 | .configs += [ ^main_config ^win_config ] 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/draw2d/win/dctx_win.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: dctx_win.inl 8 | * 9 | */ 10 | 11 | /* Draw context */ 12 | 13 | #include "draw2d_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | //Gdiplus::ColorPalette* _dctx_4bpp_grayscale_palette(void); 18 | 19 | Gdiplus::ColorPalette* dctx_8bpp_grayscale_palette(void); 20 | 21 | void dctx_gradient_transform(DCtx *ctx); 22 | 23 | void dctx_set_gdi_mode(DCtx *ctx); 24 | 25 | __END_C 26 | 27 | -------------------------------------------------------------------------------- /src/draw2d/win/draw2d_gdi.ixx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: draw2d_gdi.ixx 8 | * 9 | */ 10 | 11 | /* 2D drawing support */ 12 | 13 | #ifndef __OSDRAW_WIN2_IXX__ 14 | #define __OSDRAW_WIN2_IXX__ 15 | 16 | #include "draw2d.hxx" 17 | 18 | #include "nowarn.hxx" 19 | #include 20 | #include "warn.hxx" 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/draw2d/win/draw2d_win.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: draw2d_win.inl 8 | * 9 | */ 10 | 11 | /* Drawing commands */ 12 | 13 | #include "draw2d_gdi.ixx" 14 | 15 | __EXTERN_C 16 | 17 | extern int kLOG_PIXY; 18 | 19 | extern LONG kTWIPS_PER_PIXEL; 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/draw2d/win/osimage.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osimage.inl 8 | * 9 | */ 10 | 11 | /* Images */ 12 | 13 | #include "draw2d_gdi.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void *osimage_bitmap(const OSImage *osimage); 18 | 19 | HBITMAP osimage_hbitmap(const Image *image, COLORREF background); 20 | 21 | HBITMAP osimage_hbitmap_cache(const Image *image, COLORREF background, LONG *width, LONG *height); 22 | 23 | HBITMAP osimage_transparent_hbitmap(const uint32_t width, const uint32_t height); 24 | 25 | HCURSOR osimage_hcursor(const Image *image, const uint32_t hot_x, const uint32_t hot_y); 26 | 27 | void osimage_draw(const Image *image, HDC hdc, const uint32_t frame_index, const real32_t x, const real32_t y, const real32_t width, const real32_t height, const BOOL gray); 28 | 29 | __END_C 30 | 31 | -------------------------------------------------------------------------------- /src/geom2d/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./box2d.cpp 6 | ./cir2d.cpp 7 | ./col2d.cpp 8 | ./obb2d.cpp 9 | ./pol2d.cpp 10 | ./polabel.cpp 11 | ./polpart.cpp 12 | ./r2d.cpp 13 | ./s2d.cpp 14 | ./seg2d.cpp 15 | ./t2d.cpp 16 | ./tri2d.cpp 17 | ./v2d.cpp 18 | ] 19 | .configs += ^main_config 20 | } 21 | -------------------------------------------------------------------------------- /src/geom2d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(geom2d "core") -------------------------------------------------------------------------------- /src/geom2d/obb2d.ipp: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: obb2d.ipp 8 | * 9 | */ 10 | 11 | /* Oriented Box 2d */ 12 | 13 | #ifndef __OBB2D_IPP__ 14 | #define __OBB2D_IPP__ 15 | 16 | #include "obb2d.hpp" 17 | #include "col2d.ipp" 18 | 19 | template 20 | struct OBB2DI 21 | { 22 | static SATPoly* (*sat_poly)(const OBB2D *obb); 23 | }; 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /src/geom2d/pol2d.ipp: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: pol2d.ipp 8 | * 9 | */ 10 | 11 | /* 2d convex polygon */ 12 | 13 | #ifndef __POL2D_IPP__ 14 | #define __POL2D_IPP__ 15 | 16 | #include "pol2d.hpp" 17 | #include "col2d.ipp" 18 | #include "arrpt.hpp" 19 | 20 | template 21 | struct Pol2DI 22 | { 23 | static const V2D* (*vertices)(const Pol2D *pol, uint32_t *n); 24 | 25 | static SATPoly* (*sat_poly)(const Pol2D *pol); 26 | 27 | static V2D (*poly_label)(const Pol2D *pol, const real norm_tol); 28 | 29 | static ArrPt >* (*get_convex_sat_polys)(const Pol2D *pol); 30 | 31 | static ArrPt >* (*convex_sat_polys)(Pol2D *pol); 32 | }; 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /src/geom2d/r2d.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: r2d.hpp 8 | * 9 | */ 10 | 11 | /* 2D rectangles */ 12 | 13 | #ifndef __R2D_HPP__ 14 | #define __R2D_HPP__ 15 | 16 | #include "v2d.hpp" 17 | #include "s2d.hpp" 18 | 19 | template 20 | struct R2D 21 | { 22 | R2D(); 23 | 24 | R2D(const real x, const real y, const real width, const real height); 25 | 26 | static V2D(*center)(const R2D* r2d); 27 | 28 | static bool_t(*collide)(const R2D *r2d1, const R2D *r2d2); 29 | 30 | static bool_t(*contains)(const R2D *r2d, const real x, const real y); 31 | 32 | static bool_t(*clip)(const R2D *viewport, const R2D *r2d); 33 | 34 | static void(*join)(R2D *r2d, const R2D *src); 35 | 36 | static const R2D *kZERO; 37 | 38 | V2D pos; 39 | S2D size; 40 | }; 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /src/geom2d/s2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: s2d.h 8 | * https://nappgui.com/en/geom2d/s2d.html 9 | * 10 | */ 11 | 12 | /* Size 2d */ 13 | 14 | #include "geom2d.hxx" 15 | 16 | __EXTERN_C 17 | 18 | S2Df s2df(const real32_t width, const real32_t height); 19 | 20 | S2Df s2di(const uint32_t width, const uint32_t height); 21 | 22 | S2Dd s2dd(const real64_t width, const real64_t height); 23 | 24 | extern const S2Df kS2D_ZEROf; 25 | extern const S2Dd kS2D_ZEROd; 26 | 27 | __END_C 28 | -------------------------------------------------------------------------------- /src/geom2d/s2d.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: s2d.hpp 8 | * 9 | */ 10 | 11 | /* Size 2d */ 12 | 13 | #ifndef __S2D_HPP__ 14 | #define __S2D_HPP__ 15 | 16 | template 17 | struct S2D 18 | { 19 | S2D() {width = 0, height = 0;} 20 | 21 | S2D(const real _width, const real _height) {width = _width, height = _height;} 22 | 23 | static const S2D *kZERO; 24 | 25 | real width; 26 | real height; 27 | }; 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /src/gui/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir res 4 | 5 | let sources * : SourceSet { 6 | .sources = [ 7 | ./gui.cpp 8 | ./button.c 9 | ./combo.c 10 | ./component.c 11 | ./comwin.c 12 | ./drawctrl.c 13 | ./edit.c 14 | ./gbind.c 15 | ./globals.c 16 | ./imageview.c 17 | ./label.c 18 | ./layout.c 19 | ./listbox.c 20 | ./menu.c 21 | ./menuitem.c 22 | ./panel.c 23 | ./popup.c 24 | ./progress.c 25 | ./slider.c 26 | ./splitview.c 27 | ./tableview.c 28 | ./textview.c 29 | ./updown.c 30 | ./view.c 31 | ./window.c 32 | ./res/res_assert/res_assert.c 33 | ] 34 | .configs += ^main_config; 35 | .include_dirs += ./res/res_assert 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/gui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(gui "draw2d") -------------------------------------------------------------------------------- /src/gui/button.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: button.inl 8 | * 9 | */ 10 | 11 | /* Button */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _button_destroy(Button **button); 18 | 19 | void _button_dimension(Button *button, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | void _button_locale(Button *button); 22 | 23 | button_flag_t _button_flags(const Button *button); 24 | 25 | bool_t _button_is_pushbutton(const Button *button); 26 | 27 | bool_t _button_is_radio(const Button *button); 28 | 29 | Listener *_button_radio_listener(const Button *button); 30 | 31 | void _button_radio_state(Button *button, const state_t state); 32 | 33 | void _button_bool(Button *button, const bool_t value); 34 | 35 | void _button_uint32(Button *button, const uint32_t value); 36 | 37 | __END_C 38 | 39 | -------------------------------------------------------------------------------- /src/gui/combo.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: combo.inl 8 | * 9 | */ 10 | 11 | /* Combo box */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _combo_destroy(Combo **combo); 18 | 19 | void _combo_dimension(Combo *combo, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | void _combo_locale(Combo *combo); 22 | 23 | __END_C 24 | -------------------------------------------------------------------------------- /src/gui/comwin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: comwin.h 8 | * https://nappgui.com/en/gui/comwin.html 9 | * 10 | */ 11 | 12 | /* Common windows */ 13 | 14 | #include "gui.hxx" 15 | 16 | __EXTERN_C 17 | 18 | const char_t *comwin_open_file(Window *parent, const char_t **ftypes, const uint32_t size, const char_t *start_dir); 19 | 20 | const char_t *comwin_save_file(Window *parent, const char_t **ftypes, const uint32_t size, const char_t *start_dir); 21 | 22 | void comwin_color(Window *parent, const char_t *title, const real32_t x, const real32_t y, const align_t halign, const align_t valign, const color_t current, color_t *colors, const uint32_t n, Listener *OnChange); 23 | 24 | __END_C 25 | -------------------------------------------------------------------------------- /src/gui/edit.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: edit.inl 8 | * 9 | */ 10 | 11 | /* Edit Box */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _edit_destroy(Edit **edit); 18 | 19 | void _edit_dimension(Edit *edit, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | void _edit_locale(Edit *edit); 22 | 23 | bool_t _edit_is_multiline(const Edit *edit); 24 | 25 | void _edit_text(Edit *edit, const char_t *text); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/gui/globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: globals.h 8 | * 9 | */ 10 | 11 | /* System globals */ 12 | 13 | #include "gui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | device_t globals_device(void); 18 | 19 | void globals_resolution(S2Df *resolution); 20 | 21 | V2Df globals_mouse_position(void); 22 | 23 | __END_C 24 | -------------------------------------------------------------------------------- /src/gui/guiall.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: guiall.h 8 | * 9 | */ 10 | 11 | /* All-in-one gui headers */ 12 | 13 | /* osdraw */ 14 | #include "draw2dall.h" 15 | 16 | /* gui */ 17 | #include "button.h" 18 | #include "edit.h" 19 | #include "cell.h" 20 | #include "combo.h" 21 | #include "comwin.h" 22 | #include "globals.h" 23 | #include "gui.h" 24 | #include "label.h" 25 | #include "layout.h" 26 | #include "listbox.h" 27 | #include "menu.h" 28 | #include "menuitem.h" 29 | #include "panel.h" 30 | #include "popup.h" 31 | #include "progress.h" 32 | #include "slider.h" 33 | #include "view.h" 34 | #include "textview.h" 35 | #include "imageview.h" 36 | #include "tableview.h" 37 | #include "splitview.h" 38 | #include "updown.h" 39 | #include "window.h" 40 | 41 | -------------------------------------------------------------------------------- /src/gui/imageview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: imageview.h 8 | * https://nappgui.com/en/gui/imageview.html 9 | * 10 | */ 11 | 12 | /* Image view */ 13 | 14 | #include "gui.hxx" 15 | 16 | __EXTERN_C 17 | 18 | ImageView *imageview_create(void); 19 | 20 | void imageview_size(ImageView *view, S2Df size); 21 | 22 | void imageview_scale(ImageView *view, const scale_t scale); 23 | 24 | void imageview_image(ImageView *view, const Image *image); 25 | 26 | void imageview_OnClick(ImageView *view, Listener *listener); 27 | 28 | void imageview_OnOverDraw(ImageView *view, Listener *listener); 29 | 30 | __END_C 31 | -------------------------------------------------------------------------------- /src/gui/label.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: label.inl 8 | * 9 | */ 10 | 11 | /* Label */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _label_destroy(Label **label); 18 | 19 | void _label_dimension(Label *label, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | void _label_locale(Label *label); 22 | 23 | void _label_text(Label *label, const char_t *text); 24 | 25 | bool_t _label_is_multiline(const Label *label); 26 | 27 | __END_C 28 | -------------------------------------------------------------------------------- /src/gui/listbox.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: listbox.inl 8 | * 9 | */ 10 | 11 | /* Listbox */ 12 | 13 | #include "gui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | uint32_t _listbox_count(const ListBox *listbox); 18 | 19 | void _listbox_add_enum_item(ListBox *listbox, const char_t *text); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/gui/menu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: menu.h 8 | * https://nappgui.com/en/gui/menu.html 9 | * 10 | */ 11 | 12 | /* Menu */ 13 | 14 | #include "gui.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Menu *menu_create(void); 19 | 20 | void menu_destroy(Menu **menu); 21 | 22 | void menu_item(Menu *menu, MenuItem *item); 23 | 24 | void menu_launch(Menu *menu, const V2Df position); 25 | 26 | void menu_hide(Menu *menu); 27 | 28 | void menu_off_items(Menu *menu); 29 | 30 | MenuItem *menu_get_item(Menu *menu, const uint32_t index); 31 | 32 | uint32_t menu_size(const Menu *menu); 33 | 34 | __END_C 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/gui/menu.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: menu.inl 8 | * 9 | */ 10 | 11 | /* Menu */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _menu_destroy(Menu **menu); 18 | 19 | void _menu_set_parent(Menu *menu); 20 | 21 | void _menu_unset_parent(Menu *menu); 22 | 23 | void _menu_locale(Menu *menu); 24 | 25 | void *_menu_ositem(Menu *menu); 26 | 27 | __END_C 28 | -------------------------------------------------------------------------------- /src/gui/menuitem.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: menuitem.inl 8 | * 9 | */ 10 | 11 | /* Menu Item */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _menuitem_destroy(MenuItem **item); 18 | 19 | void *_menuitem_get_renderable(const MenuItem *item); 20 | 21 | void _menuitem_set_parent(MenuItem *item, const uint32_t index); 22 | 23 | void _menuitem_unset_parent(MenuItem *item); 24 | 25 | void _menuitem_locale(MenuItem *item); 26 | 27 | __END_C 28 | -------------------------------------------------------------------------------- /src/gui/popup.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: popup.inl 8 | * 9 | */ 10 | 11 | /* Pop-up button */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _popup_destroy(PopUp **popup); 18 | 19 | void _popup_dimension(PopUp *popup, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | void _popup_locale(PopUp *popup); 22 | 23 | uint32_t _popup_size(const PopUp *popup); 24 | 25 | void _popup_list_height(PopUp *popup, const uint32_t elems); 26 | 27 | void _popup_uint32(PopUp *popup, const uint32_t value); 28 | 29 | void _popup_add_enum_item(PopUp *popup, const char_t *text); 30 | 31 | __END_C 32 | -------------------------------------------------------------------------------- /src/gui/progress.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: progress.h 8 | * https://nappgui.com/en/gui/progress.html 9 | * 10 | */ 11 | 12 | /* Progress bars */ 13 | 14 | #include "gui.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Progress *progress_create(void); 19 | 20 | void progress_undefined(Progress *progress, const bool_t running); 21 | 22 | void progress_value(Progress *progress, const real32_t value); 23 | 24 | __END_C 25 | 26 | -------------------------------------------------------------------------------- /src/gui/progress.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: progress.inl 8 | * 9 | */ 10 | 11 | /* Progress indicator */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _progress_destroy(Progress **progress); 18 | 19 | void _progress_dimension(Progress *progress, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/gui/res/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir res_assert 4 | -------------------------------------------------------------------------------- /src/gui/res/res_assert/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/gui/res/res_assert/bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/gui/res/res_assert/bomb.png -------------------------------------------------------------------------------- /src/gui/res/res_assert/bomb_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/gui/res/res_assert/bomb_dark.png -------------------------------------------------------------------------------- /src/gui/res/res_assert/confused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/gui/res/res_assert/confused.png -------------------------------------------------------------------------------- /src/gui/res/res_assert/confused_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/gui/res/res_assert/confused_dark.png -------------------------------------------------------------------------------- /src/gui/res/res_assert/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/gui/res/res_assert/logo.png -------------------------------------------------------------------------------- /src/gui/res/res_assert/logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/gui/res/res_assert/logo_dark.png -------------------------------------------------------------------------------- /src/gui/res/res_assert/res_assert.h: -------------------------------------------------------------------------------- 1 | /* Automatic generated by NAppGUI Resource Compiler (nrc-v3326) */ 2 | 3 | #include "core.hxx" 4 | 5 | __EXTERN_C 6 | 7 | /* Messages */ 8 | extern ResId ASSERT_CRASH; 9 | extern ResId ASSERT_INFO; 10 | extern ResId CONTACT_INFO; 11 | extern ResId FILE_TEXT; 12 | extern ResId LINE_TEXT; 13 | extern ResId SHOW_ASSERT; 14 | extern ResId ASSERT_LOG; 15 | extern ResId ASSERT_TITLE; 16 | extern ResId DEBUG_TEXT; 17 | extern ResId CONTINUE_TEXT; 18 | extern ResId EXIT_TEXT; 19 | 20 | /* Files */ 21 | extern ResId BOMB_PNG; 22 | extern ResId BOMB_DARK_PNG; 23 | extern ResId CONFUSED_PNG; 24 | extern ResId CONFUSED_DARK_PNG; 25 | extern ResId LOGO_PNG; 26 | extern ResId LOGO_DARK_PNG; 27 | 28 | ResPack *res_assert_respack(const char_t *locale); 29 | 30 | __END_C 31 | -------------------------------------------------------------------------------- /src/gui/res/res_assert/strings.msg: -------------------------------------------------------------------------------- 1 | ASSERT_CRASH You can't continue with the program running. 2 | ASSERT_INFO The program can continue in UNSECURED WAY. It's possible that the results now will be incorrect or data loss occurs. 3 | CONTACT_INFO For more information about this incident, please contact with: 4 | FILE_TEXT File 5 | LINE_TEXT Line 6 | SHOW_ASSERT Show this window in next assert. 7 | ASSERT_LOG Write assert info in log. 8 | ASSERT_TITLE %s ran into a problem 9 | DEBUG_TEXT Debug 10 | CONTINUE_TEXT Continue 11 | EXIT_TEXT Exit 12 | 13 | -------------------------------------------------------------------------------- /src/gui/slider.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: slider.h 8 | * https://nappgui.com/en/gui/slider.html 9 | * 10 | */ 11 | 12 | /* Slider */ 13 | 14 | #include "gui.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Slider *slider_create(void); 19 | 20 | Slider *slider_vertical(void); 21 | 22 | void slider_OnMoved(Slider *slider, Listener *listener); 23 | 24 | void slider_tooltip(Slider *slider, const char_t *text); 25 | 26 | void slider_steps(Slider *slider, const uint32_t steps); 27 | 28 | void slider_value(Slider *slider, const real32_t value); 29 | 30 | real32_t slider_get_value(const Slider *slider); 31 | 32 | __END_C 33 | 34 | -------------------------------------------------------------------------------- /src/gui/slider.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: slider.inl 8 | * 9 | */ 10 | 11 | /* Slider */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _slider_destroy(Slider **slider); 18 | 19 | void _slider_dimension(Slider *slider, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | bool_t _slider_is_horizontal(const Slider *slider); 22 | 23 | void _slider_real32(Slider *slider, const real32_t value); 24 | 25 | __END_C 26 | 27 | -------------------------------------------------------------------------------- /src/gui/splitview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: splitview.h 8 | * https://nappgui.com/en/gui/splitview.html 9 | * 10 | */ 11 | 12 | /* Split view */ 13 | 14 | #include "gui.hxx" 15 | 16 | __EXTERN_C 17 | 18 | SplitView *splitview_horizontal(void); 19 | 20 | SplitView *splitview_vertical(void); 21 | 22 | void splitview_size(SplitView *split, const S2Df size); 23 | 24 | void splitview_view(SplitView *split, View *view); 25 | 26 | void splitview_text(SplitView *split, TextView *view); 27 | 28 | void splitview_split(SplitView *split, SplitView *child); 29 | 30 | void splitview_panel(SplitView *split, Panel *panel); 31 | 32 | void splitview_pos(SplitView *split, const real32_t pos); 33 | 34 | __END_C 35 | 36 | -------------------------------------------------------------------------------- /src/gui/splitview.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: splitview.inl 8 | * 9 | */ 10 | 11 | /* Split view */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _splitview_destroy(SplitView **split); 18 | 19 | void _splitview_dimension(SplitView *split, const uint32_t di, real32_t *dim0, real32_t *dim1); 20 | 21 | void _splitview_expand(SplitView *split, const uint32_t di, const real32_t current_size, const real32_t required_size, real32_t *final_size); 22 | 23 | void _splitview_taborder(const SplitView *split, Window *window); 24 | 25 | void _splitview_OnResize(SplitView *split, const S2Df *size); 26 | 27 | void _splitview_panels(const SplitView *split, uint32_t *num_panels, Panel **panels); 28 | 29 | __END_C 30 | -------------------------------------------------------------------------------- /src/gui/textview.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: textview.inl 8 | * 9 | */ 10 | 11 | /* Text view */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _textview_destroy(TextView **view); 18 | 19 | void _textview_dimension(TextView *view, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/gui/updown.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: updown.h 8 | * https://nappgui.com/en/gui/updown.html 9 | * 10 | */ 11 | 12 | /* Up Down */ 13 | 14 | #include "gui.hxx" 15 | 16 | __EXTERN_C 17 | 18 | UpDown *updown_create(void); 19 | 20 | void updown_OnClick(UpDown *updown, Listener *listener); 21 | 22 | void updown_tooltip(UpDown *updown, const char_t *text); 23 | 24 | __END_C 25 | -------------------------------------------------------------------------------- /src/gui/updown.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: updown.inl 8 | * 9 | */ 10 | 11 | /* Up Down */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _updown_destroy(UpDown **updown); 18 | 19 | void _updown_dimension(UpDown *updown, const uint32_t i, real32_t *dim0, real32_t *dim1); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/gui/window.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: window.inl 8 | * 9 | */ 10 | 11 | /* Windows */ 12 | 13 | #include "gui.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _window_update(Window *window); 18 | 19 | void _window_update_theme(Window *window); 20 | 21 | void *_window_ositem(Window *window); 22 | 23 | bool_t _window_is_visible(const Window *window); 24 | 25 | #if defined (__DESKTOP__) 26 | 27 | void _window_taborder(Window *window, void *ositem); 28 | 29 | #endif 30 | 31 | void _window_locale(Window *window); 32 | 33 | gui_role_t _window_role(const Window *window); 34 | 35 | V2Df _window_get_origin(const Window *window); 36 | 37 | S2Df _window_get_size(const Window *window); 38 | 39 | void window_launch_overlay(Window *window, Window *parent_window); 40 | 41 | __END_C 42 | 43 | -------------------------------------------------------------------------------- /src/howto/col2dhello/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(Col2dHello "") -------------------------------------------------------------------------------- /src/howto/col2dhello/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/col2dhello/res/banner.bmp -------------------------------------------------------------------------------- /src/howto/col2dhello/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/howto/col2dhello/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/col2dhello/res/logo.icns -------------------------------------------------------------------------------- /src/howto/col2dhello/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/col2dhello/res/logo256.ico -------------------------------------------------------------------------------- /src/howto/col2dhello/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/col2dhello/res/logo48.ico -------------------------------------------------------------------------------- /src/howto/col2dhello/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Write here the application description 4 | -------------------------------------------------------------------------------- /src/howto/drawhello/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(DrawHello "") -------------------------------------------------------------------------------- /src/howto/drawhello/res/all/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawhello/res/all/image.jpg -------------------------------------------------------------------------------- /src/howto/drawhello/res/all/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawhello/res/all/image.png -------------------------------------------------------------------------------- /src/howto/drawhello/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawhello/res/banner.bmp -------------------------------------------------------------------------------- /src/howto/drawhello/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/howto/drawhello/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawhello/res/logo.icns -------------------------------------------------------------------------------- /src/howto/drawhello/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawhello/res/logo256.ico -------------------------------------------------------------------------------- /src/howto/drawhello/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawhello/res/logo48.ico -------------------------------------------------------------------------------- /src/howto/drawhello/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Write here the application description 4 | -------------------------------------------------------------------------------- /src/howto/drawimg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(DrawImg "") -------------------------------------------------------------------------------- /src/howto/drawimg/res/allres/Monkey.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawimg/res/allres/Monkey.gif -------------------------------------------------------------------------------- /src/howto/drawimg/res/allres/zombie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawimg/res/allres/zombie.png -------------------------------------------------------------------------------- /src/howto/drawimg/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawimg/res/banner.bmp -------------------------------------------------------------------------------- /src/howto/drawimg/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/howto/drawimg/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawimg/res/logo.icns -------------------------------------------------------------------------------- /src/howto/drawimg/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawimg/res/logo256.ico -------------------------------------------------------------------------------- /src/howto/drawimg/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/drawimg/res/logo48.ico -------------------------------------------------------------------------------- /src/howto/drawimg/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Write here the application description 4 | -------------------------------------------------------------------------------- /src/howto/guihello/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(GuiHello "") -------------------------------------------------------------------------------- /src/howto/guihello/baslayout.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: baslayout.h 8 | * 9 | */ 10 | 11 | /* Basic Layout Composing */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *basic_layout(void); 16 | 17 | -------------------------------------------------------------------------------- /src/howto/guihello/buttons.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: buttons.h 8 | * 9 | */ 10 | 11 | /* Buttons basics */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *buttons_basics(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/form.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: form.h 8 | * 9 | */ 10 | 11 | /* Form demo */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *form_basic(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/guibind.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: guibind.h 8 | * 9 | */ 10 | 11 | /* GUI data binding */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *guibind(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/labels.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: labels.h 8 | * 9 | */ 10 | 11 | /* Labels basics */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *labels_single_line(void); 16 | 17 | Panel *labels_multi_line(void); 18 | 19 | Panel *labels_mouse_over(void); 20 | -------------------------------------------------------------------------------- /src/howto/guihello/layoutbind.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: layoutbind.h 8 | * 9 | */ 10 | 11 | /* GUI data binding */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *layoutbind(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/listboxes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: listboxes.h 8 | * 9 | */ 10 | 11 | /* Listboxes */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *listboxes(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/multilayout.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: multilayout.h 8 | * 9 | */ 10 | 11 | /* Panels with multiple layouts */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *multilayouts(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/popcom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: popcom.h 8 | * 9 | */ 10 | 11 | /* PopUp and Combo */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *popup_combo(void); 16 | 17 | -------------------------------------------------------------------------------- /src/howto/guihello/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/banner.bmp -------------------------------------------------------------------------------- /src/howto/guihello/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/howto/guihello/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/logo.icns -------------------------------------------------------------------------------- /src/howto/guihello/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/logo256.ico -------------------------------------------------------------------------------- /src/howto/guihello/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/logo48.ico -------------------------------------------------------------------------------- /src/howto/guihello/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=HelloWorld program for NAppGUI SDK. 4 | 5 | -------------------------------------------------------------------------------- /src/howto/guihello/res/res/TextView.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0 Courier New;}} 2 | {\colortbl ;\red255\green0\blue0;\red0\green176\blue80;\red0\green77\blue187;\red192\green192\blue192;} 3 | {\*\generator Riched20 10.0.18362}\viewkind4\uc1 4 | \pard\sa200\sl276\slmult1\fs32\lang9 What is Lorem Ipsum?\fs22\par 5 | Lorem Ipsum \b is simply\b0 dummy text of the \i printing and typesetting\i0 industry. \cf1\fs32 Lorem Ipsum\cf0 \fs22 has been the \f1\fs28 [industry's standard] \ul\f0\fs22 dummy text\ulnone ever \strike since the 1500s\strike0 , when an \cf2 unknown printer\cf0 took a galley of type and scrambled it to make a type specimen book\cf3\highlight4\i . It has survived not only five centuries\cf0\highlight0\i0 , but also the leap into electronic typesetting, remaining essentially unchanged.\par 6 | } 7 | -------------------------------------------------------------------------------- /src/howto/guihello/res/res/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/about.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/access.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/back.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/back16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/back16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/back_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/back_red.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/black.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/blue.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/building.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/building.jpg -------------------------------------------------------------------------------- /src/howto/guihello/res/res/car.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/car.jpg -------------------------------------------------------------------------------- /src/howto/guihello/res/res/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/close.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/disk12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/disk12.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/disk16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/disk16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/disk24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/disk24.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/disk32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/disk32.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/disk64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/disk64.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/disk8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/disk8.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/document.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/edit16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/edit16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/edit24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/edit24.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/edit32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/edit32.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/edit64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/edit64.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/error16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/error16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/error24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/error24.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/error32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/error32.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/error64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/error64.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/excel.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/exit.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/first.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/first16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/first16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/first_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/first_red.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/folder16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/folder16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/folder24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/folder24.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/folder32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/folder32.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/folder64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/folder64.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/green.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/italy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/italy.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/japan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/japan.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/jpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/jpg.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/laptop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/laptop.jpg -------------------------------------------------------------------------------- /src/howto/guihello/res/res/last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/last.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/last16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/last16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/last_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/last_red.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/login.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/logout.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/next.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/next16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/next16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/next_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/next_red.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/open.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/pdf.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/play.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/play_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/play_red.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/plus16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/plus16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/plus24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/plus24.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/plus32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/plus32.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/plus64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/plus64.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/portugal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/portugal.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/powerpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/powerpoint.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/red.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/refresh.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/refresh_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/refresh_red.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/restore16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/restore16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/retry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/retry.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/russia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/russia.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/save.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/search16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/search16.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/search24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/search24.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/search32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/search32.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/search64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/search64.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/settings.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/spain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/spain.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/strings.msg: -------------------------------------------------------------------------------- 1 | /* Main Menu Strings */ 2 | 3 | ABOUT "About Products" 4 | PREFERENCES "Preferences..." 5 | QUIT "Quit Products" 6 | OPEN_DATABASE "Open Database..." 7 | SAVE_DATABASE "Save Database..." 8 | CLOSE_DATABASE "Close Database" 9 | EXIT "Exit" 10 | FIRST_RECORD "Go to first record" 11 | BACK_RECORD "Go to previous record" 12 | NEXT_RECORD "Go to next record" 13 | LAST_RECORD "Go to last record" 14 | VIEW_FORM "Form" 15 | VIEW_TABLE "Table" 16 | LOGIN_PANEL "Login Panel" 17 | LOGOUT "Log Out" 18 | ABOUT_NAPPGUI "About NAppGUI" 19 | FILEM "File" 20 | NAVIGATE "Navigate" 21 | VIEW "View" 22 | SERVER "Server" 23 | HELP "Help" 24 | 25 | -------------------------------------------------------------------------------- /src/howto/guihello/res/res/uking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/uking.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/vietnam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/vietnam.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/warning.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/white.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/word.png -------------------------------------------------------------------------------- /src/howto/guihello/res/res/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/guihello/res/res/yellow.png -------------------------------------------------------------------------------- /src/howto/guihello/scrollpanel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: scrollpanel.h 8 | * 9 | */ 10 | 11 | /* Panel with scroll */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *scrollpanel(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/sliders.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: sliders.h 8 | * 9 | */ 10 | 11 | /* Sliders */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *sliders(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/splits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: splits.h 8 | * 9 | */ 10 | 11 | /* Use of splitviews */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *split_panel(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/sublayout.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: sublayout.h 8 | * 9 | */ 10 | 11 | /* Sublayouts */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *sublayouts(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/subpanel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: subpanel.h 8 | * 9 | */ 10 | 11 | /* Use of subpanels */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *subpanels(void); 16 | 17 | -------------------------------------------------------------------------------- /src/howto/guihello/table.c: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: table.c 8 | * 9 | */ 10 | 11 | /* Use of tables */ 12 | 13 | #include "table.h" 14 | #include "guiall.h" 15 | #include "res.h" 16 | 17 | /*---------------------------------------------------------------------------*/ 18 | 19 | Panel *table(void) 20 | { 21 | //Layout *layout = layout_create(1, 1); 22 | //TableView *table = tableview_create(4, ekTBTEXT); 23 | //Label *label2 = label_create(); 24 | //TextView *text1 = textview_create(); 25 | //TextView *text2 = textview_create(); 26 | Panel *panel = panel_create(); 27 | return panel; 28 | } 29 | -------------------------------------------------------------------------------- /src/howto/guihello/table.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: table.h 8 | * 9 | */ 10 | 11 | /* Use of tables */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *table(void); 16 | -------------------------------------------------------------------------------- /src/howto/guihello/textviews.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: textviews.h 8 | * 9 | */ 10 | 11 | /* Use of textviews */ 12 | 13 | #include "gui.hxx" 14 | 15 | Panel *textviews(void); 16 | -------------------------------------------------------------------------------- /src/howto/urlimg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processDesktopApp(UrlImg "inet") -------------------------------------------------------------------------------- /src/howto/urlimg/res/banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/urlimg/res/banner.bmp -------------------------------------------------------------------------------- /src/howto/urlimg/res/license.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License 2 | 3 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 4 | 5 | https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /src/howto/urlimg/res/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/urlimg/res/logo.icns -------------------------------------------------------------------------------- /src/howto/urlimg/res/logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/urlimg/res/logo256.ico -------------------------------------------------------------------------------- /src/howto/urlimg/res/logo48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/howto/urlimg/res/logo48.ico -------------------------------------------------------------------------------- /src/howto/urlimg/res/pack.txt: -------------------------------------------------------------------------------- 1 | VENDOR=NAppGUI 2 | VERSION=1.0 3 | DESC=Write here the application description 4 | -------------------------------------------------------------------------------- /src/inet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(inet "core") -------------------------------------------------------------------------------- /src/inet/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: base64.h 8 | * https://nappgui.com/en/inet/base64.html 9 | * 10 | */ 11 | 12 | /* Base64 encoding */ 13 | 14 | #include "inet.hxx" 15 | 16 | uint32_t b64_encoded_size(const uint32_t data_size); 17 | 18 | uint32_t b64_decoded_size(const uint32_t encoded_size); 19 | 20 | uint32_t b64_encode(const byte_t *data, const uint32_t size, char_t *base64, const uint32_t esize); 21 | 22 | uint32_t b64_decode(const char_t *base64, const uint32_t size, byte_t *data); 23 | -------------------------------------------------------------------------------- /src/inet/inet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: inet.h 8 | * https://nappgui.com/en/inet/inet.html 9 | * 10 | */ 11 | 12 | /* Json parser */ 13 | 14 | #include "inet.hxx" 15 | 16 | __EXTERN_C 17 | 18 | void inet_start(void); 19 | 20 | void inet_finish(void); 21 | 22 | __END_C 23 | -------------------------------------------------------------------------------- /src/inet/inet.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: inet.hxx 8 | * https://nappgui.com/en/inet/inet.html 9 | * 10 | */ 11 | 12 | /* inet library */ 13 | 14 | #ifndef __INET_HXX__ 15 | #define __INET_HXX__ 16 | 17 | #include "core.hxx" 18 | 19 | typedef enum _ierror_t 20 | { 21 | ekINONET = 1, 22 | ekINOHOST, 23 | ekITIMEOUT, 24 | ekISTREAM, 25 | ekISERVER, 26 | ekINOIMPL, 27 | ekIUNDEF, 28 | ekIOK 29 | } ierror_t; 30 | 31 | typedef struct _url_t Url; 32 | typedef struct _http_t Http; 33 | typedef struct _json_t Json; 34 | typedef struct _jsonopts_t JsonOpts; 35 | 36 | struct _jsonopts_t 37 | { 38 | uint32_t not_used; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/inet/inet.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: inet.inl 8 | * 9 | */ 10 | 11 | /* inet library */ 12 | 13 | #include "inet.ixx" 14 | 15 | __EXTERN_C 16 | 17 | uint32_t _inet_hex_value(const char_t *hex); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/inet/inet.ixx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: inet.ixx 8 | * 9 | */ 10 | 11 | /* inet library */ 12 | 13 | #ifndef __INET_IXX__ 14 | #define __INET_IXX__ 15 | 16 | #include "inet.hxx" 17 | 18 | typedef struct _oshttp_t OSHttp; 19 | typedef struct _field_t Field; 20 | 21 | struct _field_t 22 | { 23 | String *name; 24 | String *value; 25 | }; 26 | 27 | DeclSt(Field); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/inet/url.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: url.h 8 | * https://nappgui.com/en/inet/url.html 9 | * 10 | */ 11 | 12 | /* URL parser */ 13 | 14 | #include "inet.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Url *url_parse(const char_t *url); 19 | 20 | void url_destroy(Url **url); 21 | 22 | const char_t *url_scheme(const Url *url); 23 | 24 | const char_t *url_user(const Url *url); 25 | 26 | const char_t *url_pass(const Url *url); 27 | 28 | const char_t *url_host(const Url *url); 29 | 30 | const char_t *url_path(const Url *url); 31 | 32 | const char_t *url_params(const Url *url); 33 | 34 | const char_t *url_query(const Url *url); 35 | 36 | const char_t *url_fragment(const Url *url); 37 | 38 | String *url_resource(const Url *url); 39 | 40 | uint16_t url_port(const Url *url); 41 | 42 | __END_C 43 | -------------------------------------------------------------------------------- /src/osapp/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir gtk3 4 | subdir osx 5 | subdir win 6 | 7 | let sources * : SourceSet { 8 | .sources = [ 9 | ./osapp.c 10 | ] 11 | .configs += [ ^main_config ] 12 | .include_dirs += . 13 | 14 | if target_os == `linux { 15 | .configs += ^gtk_config; 16 | .sources += ./gtk3/osapp_gtk.c 17 | .include_dirs += ../osgui/gtk3 18 | }else if target_os == `macos { 19 | .configs += ^osx_config; 20 | .sources += ./osx/osapp_osx.m 21 | .include_dirs += ../osgui/osx 22 | }else if target_os == `win32 { 23 | .configs += ^win_config; 24 | .sources += ./win/osapp_win.c 25 | .include_dirs += ../osgui/win 26 | }else { 27 | error("target os not supported") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/osapp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(osapp "osgui;gui") -------------------------------------------------------------------------------- /src/osapp/gtk3/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/osapp/gtk3/osapp_gtk.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osapp_gtk.inl 8 | * 9 | */ 10 | 11 | /* Application runloop */ 12 | 13 | #include "osapp_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | 18 | __END_C 19 | 20 | -------------------------------------------------------------------------------- /src/osapp/gtk3/osapp_gtk.ixx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osapp_gtk.ixx 8 | * 9 | */ 10 | 11 | /* Application runloop */ 12 | 13 | #ifndef __OSAPPGTK_IXX__ 14 | #define __OSAPPGTK_IXX__ 15 | 16 | #include "osapp.ixx" 17 | 18 | #if !defined(__GTK3__) 19 | #error This file is only for GTK Toolkit 20 | #endif 21 | 22 | #include "nowarn.hxx" 23 | #include 24 | #include "warn.hxx" 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /src/osapp/nappgui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: nappgui.h 8 | * 9 | */ 10 | 11 | /* All-In-One NAppGUI headers */ 12 | 13 | #include "osapp.h" 14 | #include "guiall.h" 15 | 16 | -------------------------------------------------------------------------------- /src/osapp/osapp.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osapp.hxx 8 | * https://nappgui.com/en/osapp/osapp.html 9 | * 10 | */ 11 | 12 | /* Application runloop */ 13 | 14 | #ifndef __OSAPP_HXX__ 15 | #define __OSAPP_HXX__ 16 | 17 | #include "gui.hxx" 18 | 19 | typedef uint32_t(*FPtr_task_main)(void *data); 20 | #define FUNC_CHECK_TASK_MAIN(func, type)\ 21 | (void)((uint32_t(*)(type*))func == func) 22 | 23 | typedef void(*FPtr_task_update)(void *data); 24 | #define FUNC_CHECK_TASK_UPDATE(func, type)\ 25 | (void)((void(*)(type*))func == func) 26 | 27 | typedef void(*FPtr_task_end)(void *data, const uint32_t rvalue); 28 | #define FUNC_CHECK_TASK_END(func, type)\ 29 | (void)((void(*)(type*, const uint32_t))func == func) 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/osapp/osapp.ixx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osapp.ixx 8 | * 9 | */ 10 | 11 | /* Application runloop */ 12 | 13 | #ifndef __OSAPP_IXX__ 14 | #define __OSAPP_IXX__ 15 | 16 | #include "osapp.hxx" 17 | #include "gui.ixx" 18 | 19 | typedef struct _osapp_t OSApp; 20 | 21 | typedef void(*FPtr_void)(void); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/osapp/osmain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osmain.h 8 | * 9 | */ 10 | 11 | /* Cross-platform main */ 12 | 13 | #include "osmain.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void osmain_imp( 18 | uint32_t argc, 19 | char_t **argv, 20 | void *instance, 21 | const real64_t lframe, 22 | FPtr_app_create func_create, 23 | FPtr_app_update func_update, 24 | FPtr_destroy func_destroy, 25 | char_t *options); 26 | __END_C 27 | 28 | #if defined(__WINDOWS__) 29 | #include "osmain_win.h" 30 | #elif defined(__MACOS__) 31 | #include "osmain_osx.h" 32 | #elif defined(__LINUX__) 33 | #include "osmain_gtk.h" 34 | #else 35 | #error Unknown platform 36 | #endif 37 | -------------------------------------------------------------------------------- /src/osapp/osmain.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osmain.hxx 8 | * 9 | */ 10 | 11 | /* Cross-platform main */ 12 | 13 | #ifndef __OSMAIN_HXX__ 14 | #define __OSMAIN_HXX__ 15 | 16 | #include "osapp.hxx" 17 | 18 | typedef void*(*FPtr_app_create)(void); 19 | #define FUNC_CHECK_APP_CREATE(func, type)\ 20 | (void)((type*(*)(void))func == func) 21 | 22 | typedef void(*FPtr_app_update)(void *app, const real64_t prtime, const real64_t ctime); 23 | #define FUNC_CHECK_APP_UPDATE(func, type)\ 24 | (void)((void(*)(type*, const real64_t, const real64_t))func == func) 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/osapp/osx/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/osapp/osx/osapp_osx.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osapp_osx.inl 8 | * 9 | */ 10 | 11 | /* Application runloop */ 12 | 13 | __EXTERN_C 14 | 15 | __END_C 16 | 17 | -------------------------------------------------------------------------------- /src/osapp/win/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/osapp/win/osapp_win.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osapp_win.inl 8 | * 9 | */ 10 | 11 | /* Application runloop */ 12 | 13 | #include "osapp_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | __END_C 18 | -------------------------------------------------------------------------------- /src/osapp/win/osapp_win.ixx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osapp_win.ixx 8 | * 9 | */ 10 | 11 | /* Application runloop */ 12 | 13 | #ifndef __OSAPPWIN_IXX__ 14 | #define __OSAPPWIN_IXX__ 15 | 16 | #include "osapp.ixx" 17 | 18 | #include "nowarn.hxx" 19 | #include 20 | #include "warn.hxx" 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/osbs/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir linux 4 | subdir osx 5 | subdir unix 6 | subdir win 7 | 8 | let sources * : SourceSet { 9 | .sources = [ 10 | ./osbs.cpp 11 | ./log.c 12 | ./bsocket.c 13 | ] 14 | .configs += ^main_config 15 | 16 | if target_os == `linux { 17 | .sources += ./linux/sinfo.c 18 | .deps += unix.sources 19 | }else if target_os == `macos { 20 | .sources += ./osx/sinfo.m 21 | .deps += unix.sources 22 | }else if target_os == `win32 { 23 | .deps += win.sources 24 | }else { 25 | error("target os not supported") 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/osbs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(osbs "sewer") -------------------------------------------------------------------------------- /src/osbs/bmutex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bmutex.h 8 | * https://nappgui.com/en/osbs/bmutex.html 9 | * 10 | */ 11 | 12 | /* Basic synchronization services */ 13 | 14 | #include "osbs.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Mutex *bmutex_create(void); 19 | 20 | void bmutex_close(Mutex **mutex); 21 | 22 | void bmutex_lock(Mutex *mutex); 23 | 24 | void bmutex_unlock(Mutex *mutex); 25 | 26 | __END_C 27 | 28 | -------------------------------------------------------------------------------- /src/osbs/bthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bthread.h 8 | * https://nappgui.com/en/osbs/bthread.html 9 | * 10 | */ 11 | 12 | /* Basic threading services */ 13 | 14 | #include "osbs.hxx" 15 | 16 | __EXTERN_C 17 | 18 | Thread *bthread_create_imp(FPtr_thread_main thmain, void *data); 19 | 20 | int bthread_current_id(void); 21 | 22 | void bthread_close(Thread **thread); 23 | 24 | bool_t bthread_cancel(Thread *thread); 25 | 26 | uint32_t bthread_wait(Thread *thread); 27 | 28 | bool_t bthread_finish(Thread *thread, uint32_t *code); 29 | 30 | void bthread_sleep(const uint32_t milliseconds); 31 | 32 | __END_C 33 | 34 | #define bthread_create(thmain, data, type)\ 35 | (\ 36 | (void)(data == (type*)data),\ 37 | FUNC_CHECK_THREAD_MAIN(thmain, type),\ 38 | bthread_create_imp((FPtr_thread_main)thmain, (void*)data)\ 39 | ) 40 | -------------------------------------------------------------------------------- /src/osbs/btime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: btime.h 8 | * https://nappgui.com/en/osbs/btime.html 9 | * 10 | */ 11 | 12 | /* Basic time services */ 13 | 14 | #include "osbs.hxx" 15 | 16 | __EXTERN_C 17 | 18 | uint64_t btime_now(void); 19 | 20 | void btime_date(Date *date); 21 | 22 | uint64_t btime_to_micro(const Date *date); 23 | 24 | void btime_to_date(const uint64_t micro, Date *date); 25 | 26 | __END_C 27 | -------------------------------------------------------------------------------- /src/osbs/linux/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/osbs/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: log.h 8 | * https://nappgui.com/en/osbs/log.html 9 | * 10 | */ 11 | 12 | /* Manages an application log */ 13 | 14 | #include "osbs.hxx" 15 | 16 | __EXTERN_C 17 | 18 | uint32_t log_printf(const char_t *format, ...) __PRINTF(1, 2); 19 | 20 | void log_output(const bool_t std, const bool_t err); 21 | 22 | void log_file(const char_t *pathname); 23 | 24 | const char_t *log_get_file(void); 25 | 26 | __END_C 27 | -------------------------------------------------------------------------------- /src/osbs/log.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: log.inl 8 | * 9 | */ 10 | 11 | /* Manages an application log */ 12 | 13 | #include "osbs.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void _log_start(void); 18 | 19 | void _log_finish(void); 20 | 21 | void _log_printf_imp(const bool_t out_std, const bool_t err_std, const char_t *filepath, const char_t *format, va_list args); 22 | 23 | __END_C 24 | -------------------------------------------------------------------------------- /src/osbs/osbs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osbs.h 8 | * https://nappgui.com/en/osbs/osbs.html 9 | * 10 | */ 11 | 12 | /* Operating System Basic Services */ 13 | 14 | #include "osbs.hxx" 15 | 16 | __EXTERN_C 17 | 18 | void osbs_start(void); 19 | 20 | void osbs_finish(void); 21 | 22 | platform_t osbs_platform(void); 23 | 24 | win_t osbs_windows(void); 25 | 26 | endian_t osbs_endian(void); 27 | 28 | __END_C 29 | 30 | -------------------------------------------------------------------------------- /src/osbs/osbs.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osbs.inl 8 | * 9 | */ 10 | 11 | /* Operating System Basic Services */ 12 | 13 | #include "osbs.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void _osbs_mutex(Mutex *mutex); 18 | 19 | void _osbs_start_sockets(void); 20 | 21 | void _osbs_finish_sockets(void); 22 | 23 | void _osbs_directory_alloc(void); 24 | 25 | void _osbs_file_alloc(void); 26 | 27 | void _osbs_mutex_alloc(void); 28 | 29 | void _osbs_proc_alloc(void); 30 | 31 | void _osbs_thread_alloc(void); 32 | 33 | void _osbs_socket_alloc(void); 34 | 35 | void _osbs_directory_dealloc(void); 36 | 37 | void _osbs_file_dealloc(void); 38 | 39 | void _osbs_mutex_dealloc(void); 40 | 41 | void _osbs_proc_dealloc(void); 42 | 43 | void _osbs_thread_dealloc(void); 44 | 45 | void _osbs_socket_dealloc(void); 46 | 47 | __END_C 48 | 49 | -------------------------------------------------------------------------------- /src/osbs/osx/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/osbs/unix/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./bfile.c 6 | ./bmutex.c 7 | ./bproc.c 8 | ./bthread.c 9 | ./btime.c 10 | ./bsocket.c 11 | ./sinfo.c 12 | ] 13 | .configs += ^main_config 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/osbs/win/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./bfile.c 6 | ./bmutex.c 7 | ./bproc.c 8 | ./bsocket.c 9 | ./bthread.c 10 | ./btime.c 11 | ./sinfo.c 12 | ] 13 | .configs += ^main_config 14 | } 15 | -------------------------------------------------------------------------------- /src/osgui/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir gtk3 4 | subdir osx 5 | subdir win 6 | 7 | let sources * : SourceSet { 8 | .sources = [ 9 | ./osgui.cpp 10 | ./osguictx.c 11 | ] 12 | .configs += ^main_config 13 | if target_os == `linux { 14 | .deps += gtk3.sources 15 | }else if target_os == `win32 { 16 | .deps += win.sources 17 | }else if target_os == `macos { 18 | .deps += osx.sources 19 | }else { 20 | error("target os not supported") 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/osgui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(osgui "draw2d") -------------------------------------------------------------------------------- /src/osgui/gtk3/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./osbutton.c 6 | ./oscombo.c 7 | ./oscomwin.c 8 | ./oscontrol.c 9 | ./osdrawctrl.c 10 | ./osedit.c 11 | ./osglobals.c 12 | ./osgui_gtk.c 13 | ./oslabel.c 14 | ./oslistener.c 15 | ./osmenu.c 16 | ./osmenuitem.c 17 | ./ospanel.c 18 | ./ospopup.c 19 | ./osprogress.c 20 | ./osslider.c 21 | ./ossplit.c 22 | ./ostext.c 23 | ./osupdown.c 24 | ./osview.c 25 | ./oswindow.c 26 | ] 27 | .configs += [ ^main_config ^gtk_config ] 28 | .include_dirs += ../../draw2d/gtk3 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/osgui/gtk3/osbutton.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osbutton.inl 8 | * 9 | */ 10 | 11 | /* Operating System native button */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osbutton_detach_and_destroy(OSButton **button, OSPanel *panel); 18 | 19 | void _osbutton_command(OSButton *button); 20 | 21 | GtkWidget *_osbutton_focus(OSButton *button); 22 | 23 | __END_C 24 | 25 | -------------------------------------------------------------------------------- /src/osgui/gtk3/oscombo.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oscombo.inl 8 | * 9 | */ 10 | 11 | /* Operating System native combo box */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _oscombo_detach_and_destroy(OSCombo **combo, OSPanel *panel); 18 | 19 | void _oscombo_set_focus(OSCombo *combo); 20 | 21 | void _oscombo_unset_focus(OSCombo *combo); 22 | 23 | GtkWidget *_oscombo_focus(OSCombo *combo); 24 | 25 | void _oscombo_elem(GtkComboBox *combo, const op_t op, const uint32_t index, const char_t *text, const Image *image, ArrPt(String) *texts, ArrPt(Image) *images, uint32_t *imgwidth, uint32_t *imgheight); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/gtk3/oscomwin.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oscomwin.inl 8 | * 9 | */ 10 | 11 | /* Operating System native common windows */ 12 | 13 | #include "osgui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | const char_t *oscomwin_file(OSWindow *parent, const char_t **ftypes, const uint32_t size, const char_t *start_dir, const bool_t open); 18 | 19 | __END_C 20 | -------------------------------------------------------------------------------- /src/osgui/gtk3/osedit.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osedit.inl 8 | * 9 | */ 10 | 11 | /* Operating System edit box */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osedit_detach_and_destroy(OSEdit **edit, OSPanel *panel); 18 | 19 | void _osedit_set_focus(OSEdit *edit); 20 | 21 | void _osedit_unset_focus(OSEdit *edit); 22 | 23 | bool_t _osedit_autoselect(const OSEdit *edit); 24 | 25 | GtkWidget *_osedit_focus(OSEdit *edit); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/gtk3/osgui_gtk.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osgui_gtk.inl 8 | * 9 | */ 10 | 11 | /* Operating system native gui */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | extern PangoLayout *kPANGO_LAYOUT; 18 | 19 | extern real32_t kPANGO_FROM_PIXELS; 20 | 21 | const char_t *_osgui_register_icon(const Image *image); 22 | 23 | void _osgui_register_entry(GtkBorder *padding); 24 | 25 | void _osgui_ns_resize_cursor(GtkWidget *widget); 26 | 27 | void _osgui_ew_resize_cursor(GtkWidget *widget); 28 | 29 | void _osgui_default_cursor(GtkWidget *widget); 30 | 31 | void _osgui_pre_initialize(void); 32 | 33 | bool_t _osgui_is_pre_initialized(void); 34 | 35 | extern const guint kVIRTUAL_KEY[]; 36 | 37 | extern uint32_t kNUM_VKEYS; 38 | 39 | __END_C 40 | -------------------------------------------------------------------------------- /src/osgui/gtk3/oslabel.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oslabel.inl 8 | * 9 | */ 10 | 11 | /* Operating System label */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _oslabel_detach_and_destroy(OSLabel **label, OSPanel *panel); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/gtk3/ospanel.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ospanel.inl 8 | * 9 | */ 10 | 11 | /* Operating System native view */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ospanel_destroy(OSPanel **panel); 18 | 19 | void _ospanel_attach_control(OSPanel *panel, OSControl *control); 20 | 21 | void _ospanel_detach_control(OSPanel *panel, OSControl *control); 22 | 23 | void _ospanel_set_capture(OSPanel *panel, OSControl *control); 24 | 25 | void _ospanel_release_capture(OSPanel *panel); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/gtk3/ospopup.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ospopup.inl 8 | * 9 | */ 10 | 11 | /* Operating System native popup button */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ospopup_detach_and_destroy(OSPopUp **popup, OSPanel *panel); 18 | 19 | GtkWidget *_ospopup_focus(OSPopUp *popup); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/gtk3/osprogress.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osprogress.inl 8 | * 9 | */ 10 | 11 | /* Operating System native progress indicator */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osprogress_detach_and_destroy(OSProgress **progress, OSPanel *panel); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/gtk3/osslider.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osslider.inl 8 | * 9 | */ 10 | 11 | /* Operating System native slider */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osslider_detach_and_destroy(OSSlider **slider, OSPanel *panel); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/gtk3/ossplit.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ossplit.inl 8 | * 9 | */ 10 | 11 | /* Operating System split view */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ossplit_detach_and_destroy(OSSplit **view, OSPanel *panel); 18 | 19 | void _ossplit_OnPress(OSSplit *view, GdkEventButton *event); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/gtk3/ostext.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ostext.inl 8 | * 9 | */ 10 | 11 | /* Operating System textview */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ostext_detach_and_destroy(OSText **view, OSPanel *panel); 18 | 19 | void _ostext_set_capture(OSText *view, OSControl *control); 20 | 21 | void _ostext_release_capture(OSText *view); 22 | 23 | __END_C 24 | 25 | -------------------------------------------------------------------------------- /src/osgui/gtk3/osupdown.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osupdown.inl 8 | * 9 | */ 10 | 11 | /* Operating System native updown */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osupdown_detach_and_destroy(OSUpDown **updown, OSPanel *panel); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/gtk3/osview.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osview.inl 8 | * 9 | */ 10 | 11 | /* Operating System native custom view */ 12 | 13 | #include "osgui_gtk.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osview_detach_and_destroy(OSView **view, OSPanel *panel); 18 | 19 | void _osview_set_capture(OSView *view, OSControl *control); 20 | 21 | void _osview_release_capture(OSView *view); 22 | 23 | void _osview_set_focus(OSView *view); 24 | 25 | void _osview_unset_focus(OSView *view); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/oscomwin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oscomwin.h 8 | * 9 | */ 10 | 11 | /* Operating System native common windows */ 12 | 13 | #include "osgui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | const char_t *oscomwin_file(OSWindow *parent, const char_t **ftypes, const uint32_t size, const char_t *start_dir, const bool_t open); 18 | 19 | void oscomwin_color(OSWindow *parent, const char_t *title, const real32_t x, const real32_t y, const align_t halign, const align_t valign, const color_t current, color_t *colors, const uint32_t n, Listener *OnChange); 20 | 21 | __END_C 22 | -------------------------------------------------------------------------------- /src/osgui/osglobals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osglobals.h 8 | * 9 | */ 10 | 11 | /* Operating System globals */ 12 | 13 | #include "osgui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | device_t osglobals_device(const void *non_used); 18 | 19 | color_t osglobals_color(const syscolor_t *color); 20 | 21 | void osglobals_resolution(const void *non_used, real32_t *width, real32_t *height); 22 | 23 | void osglobals_mouse_position(const void *non_used, real32_t *x, real32_t *y); 24 | 25 | Cursor *osglobals_cursor(const cursor_t cursor, const Image *image, const real32_t hot_x, const real32_t hot_y); 26 | 27 | void osglobals_cursor_destroy(Cursor **cursor); 28 | 29 | void osglobals_value(const uint32_t index, void *value); 30 | 31 | __END_C 32 | -------------------------------------------------------------------------------- /src/osgui/osgui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osgui.h 8 | * 9 | */ 10 | 11 | /* Operating system native gui */ 12 | 13 | #include "osgui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void osgui_start(void); 18 | 19 | void osgui_finish(void); 20 | 21 | void osgui_set_menubar(OSMenu *menu, OSWindow *window); 22 | 23 | void osgui_unset_menubar(OSMenu *menu, OSWindow *window); 24 | 25 | void osgui_redraw_menubar(void); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/osguictx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osguictx.h 8 | * 9 | */ 10 | 11 | /* Native Gui Context */ 12 | 13 | #include "osgui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | GuiContext *osguictx(void); 18 | 19 | __END_C 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/osmenu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osmenu.h 8 | * 9 | */ 10 | 11 | /* Operating System native menu */ 12 | 13 | #include "osgui.hxx" 14 | 15 | __EXTERN_C 16 | 17 | OSMenu *osmenu_create(const enum_t flags); 18 | 19 | void osmenu_destroy(OSMenu **menu); 20 | 21 | void osmenu_add_item(OSMenu *menu, OSMenuItem *item); 22 | 23 | void osmenu_delete_item(OSMenu *menu, OSMenuItem *item); 24 | 25 | void osmenu_launch(OSMenu *menu, OSWindow *window, const real32_t x, const real32_t y); 26 | 27 | void osmenu_hide(OSMenu *menu); 28 | 29 | __END_C 30 | -------------------------------------------------------------------------------- /src/osgui/osx/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./osbutton.m 6 | ./oscolor.m 7 | ./oscombo.m 8 | ./oscomwin.m 9 | ./oscontrol.m 10 | ./osedit.m 11 | ./osglobals.m 12 | ./osgui_osx.m 13 | ./oslabel.m 14 | ./oslistener.m 15 | ./ospanel.m 16 | ./ospopup.m 17 | ./osprogress.m 18 | ./osslider.m 19 | ./ostext.m 20 | ./osupdown.m 21 | ./osview.m 22 | ./osdrawctrl.m 23 | ./osmenu.m 24 | ./osmenuitem.m 25 | ./ossplit.m 26 | ./oswindow.m 27 | ] 28 | .configs += [ ^main_config ^osx_config ] 29 | .include_dirs += ../../draw2d/osx 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/osgui/osx/osbutton.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osbutton.inl 8 | * 9 | */ 10 | 11 | /* Operating System native button */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _osbutton_is(NSView *view); 16 | 17 | void _osbutton_detach_and_destroy(OSButton **button, OSPanel *panel); 18 | 19 | BOOL _osbutton_OnIntro(NSResponder *resp); 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/osx/oscolor.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oscolor.inl 8 | * 9 | */ 10 | 11 | /* Color */ 12 | 13 | color_t oscolor_from_NSColor(NSColor *color); 14 | 15 | void oscolor_NSColor_rgba(NSColor *color, CGFloat *r, CGFloat *g, CGFloat *b, CGFloat *a); 16 | 17 | NSColor *oscolor_NSColor(const color_t color); 18 | -------------------------------------------------------------------------------- /src/osgui/osx/oscombo.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oscombo.inl 8 | * 9 | */ 10 | 11 | /* Operating System native combo box */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _oscombo_is(NSView *view); 16 | 17 | void _oscombo_detach_and_destroy(OSCombo **combo, OSPanel *panel); 18 | -------------------------------------------------------------------------------- /src/osgui/osx/oscomwin.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oscomwin.inl 8 | * 9 | */ 10 | 11 | /* Common windows */ 12 | 13 | #include "osgui.ixx" 14 | 15 | void _oscomwin_destroy_globals(void); 16 | 17 | -------------------------------------------------------------------------------- /src/osgui/osx/osedit.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osedit.inl 8 | * 9 | */ 10 | 11 | /* Operating System edit box */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _osedit_is(NSView *view); 16 | 17 | void _osedit_detach_and_destroy(OSEdit **edit, OSPanel *panel); 18 | 19 | -------------------------------------------------------------------------------- /src/osgui/osx/osgui_osx.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osgui_osx.inl 8 | * 9 | */ 10 | 11 | /* Operating system native gui */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | __EXTERN_C 16 | 17 | extern NSNumber *kUNDERLINE_STYLE_NONE; 18 | extern NSNumber *kUNDERLINE_STYLE_SINGLE; 19 | extern NSMutableParagraphStyle *kLEFT_PARAGRAPH_STYLE; 20 | extern NSMutableParagraphStyle *kCENTER_PARAGRAPH_STYLE; 21 | extern NSMutableParagraphStyle *kRIGHT_PARAGRAPH_STYLE; 22 | 23 | __END_C 24 | 25 | -------------------------------------------------------------------------------- /src/osgui/osx/oslabel.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oslabel.inl 8 | * 9 | */ 10 | 11 | /* Operating System label */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _oslabel_is(NSView *view); 16 | 17 | void _oslabel_detach_and_destroy(OSLabel **label, OSPanel *panel); 18 | 19 | -------------------------------------------------------------------------------- /src/osgui/osx/ospanel.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ospanel.inl 8 | * 9 | */ 10 | 11 | /* Operating System native panel */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ospanel_destroy(OSPanel **panel); 18 | 19 | void _ospanel_attach_control(OSPanel *panel, NSView *control); 20 | 21 | void _ospanel_detach_control(OSPanel *panel, NSView *control); 22 | 23 | __END_C 24 | 25 | -------------------------------------------------------------------------------- /src/osgui/osx/ospopup.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ospopup.inl 8 | * 9 | */ 10 | 11 | /* Operating System native popup button */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _ospopup_is(NSView *view); 16 | 17 | void _ospopup_detach_and_destroy(OSPopUp **popup, OSPanel *panel); 18 | 19 | -------------------------------------------------------------------------------- /src/osgui/osx/osprogress.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osprogress.inl 8 | * 9 | */ 10 | 11 | /* Operating System native progress indicator */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _osprogress_is(NSView *view); 16 | 17 | void _osprogress_detach_and_destroy(OSProgress **progress, OSPanel *panel); 18 | 19 | -------------------------------------------------------------------------------- /src/osgui/osx/osslider.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osslider.inl 8 | * 9 | */ 10 | 11 | /* Operating System native slider */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _osslider_is(NSView *view); 16 | 17 | void _osslider_detach_and_destroy(OSSlider **slider, OSPanel *panel); 18 | 19 | -------------------------------------------------------------------------------- /src/osgui/osx/ostext.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ostext.inl 8 | * 9 | */ 10 | 11 | /* Operating System native text view */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _ostext_is(NSView *view); 16 | 17 | void _ostext_detach_and_destroy(OSText **view, OSPanel *panel); 18 | 19 | -------------------------------------------------------------------------------- /src/osgui/osx/osupdown.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osupdown.inl 8 | * 9 | */ 10 | 11 | /* Operating System native updown */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _osupdown_is(NSView *view); 16 | 17 | void _osupdown_detach_and_destroy(OSUpDown **updown, OSPanel *panel); 18 | 19 | -------------------------------------------------------------------------------- /src/osgui/osx/osview.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osview.inl 8 | * 9 | */ 10 | 11 | /* Operating System native custom view */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | BOOL _osview_is(NSView *view); 16 | 17 | void _osview_OnFocus(NSView *view, const bool_t focus); 18 | 19 | void _osview_detach_and_destroy(OSView **view, OSPanel *panel); 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/osx/oswindow.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oswindow.inl 8 | * 9 | */ 10 | 11 | /* Operating System native view */ 12 | 13 | #include "osgui_osx.ixx" 14 | 15 | __EXTERN_C 16 | 17 | BOOL _oswindow_in_destroy(NSWindow *window); 18 | 19 | NSView *_oswindow_main_view(OSWindow *window); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/win/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./oscontrol.cpp 6 | ./osdrawctrl.cpp 7 | ./osgui_win.cpp 8 | ./osview.cpp 9 | ./osbutton.c 10 | ./oscombo.c 11 | ./oscomwin.c 12 | ./osedit.c 13 | ./osglobals.c 14 | ./osimglist.c 15 | ./oslabel.c 16 | ./oslistener.c 17 | ./osmenu.c 18 | ./osmenuitem.c 19 | ./ospanel.c 20 | ./ospopup.c 21 | ./osprogress.c 22 | ./osscroll.c 23 | ./osslider.c 24 | ./ossplit.c 25 | ./osstyleXP.c 26 | ./ostext.c 27 | ./ostooltip.c 28 | ./osupdown.c 29 | ./oswindow.c 30 | ] 31 | .configs += [ ^main_config ^win_config ] 32 | .include_dirs += ../../draw2d/win 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/osgui/win/osbutton.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osbutton.inl 8 | * 9 | */ 10 | 11 | /* Operating System native button */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osbutton_detach_and_destroy(OSButton **button, OSPanel *panel); 18 | 19 | void _osbutton_command(OSButton *button, WPARAM wParam); 20 | 21 | bool_t _osbutton_is_pushbutton(const OSButton *button); 22 | 23 | void _osbutton_set_default(OSButton *button); 24 | 25 | void _osbutton_unset_default(OSButton *button); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/win/oscombo.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oscombo.inl 8 | * 9 | */ 10 | 11 | /* Operating System native combo box */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _oscombo_detach_and_destroy(OSCombo **combo, OSPanel *panel); 18 | 19 | void _oscombo_command(OSCombo *combo, WPARAM wParam); 20 | 21 | HWND _oscombo_focus(OSCombo *combo); 22 | 23 | void _oscombo_elem(HWND hwnd, OSImgList *imglist, const op_t op, const uint32_t index, const char_t *text, const Image *image); 24 | 25 | void _oscombo_set_list_height(HWND hwnd, HWND combo_hwnd, const uint32_t image_height, uint32_t num_elems); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/win/osdrawctrl.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osdrawctrl.inl 8 | * 9 | */ 10 | 11 | /* Drawing custom GUI controls */ 12 | 13 | #include "draw2d.ixx" 14 | #include "win/draw2d_gdi.ixx" 15 | #include "osgui_win.ixx" 16 | 17 | __EXTERN_C 18 | 19 | void osdrawctrl_header(HWND hwnd, HDC hdc, HFONT font, const RECT *rect, int state, const WCHAR *text, const align_t align, const Image *image); 20 | 21 | __END_C -------------------------------------------------------------------------------- /src/osgui/win/osedit.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/osgui/win/osedit.c -------------------------------------------------------------------------------- /src/osgui/win/osedit.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osedit.inl 8 | * 9 | */ 10 | 11 | /* Operating System edit box */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osedit_detach_and_destroy(OSEdit **edit, OSPanel *panel); 18 | 19 | void _osedit_command(OSEdit *edit, WPARAM wParam); 20 | 21 | COLORREF _osedit_color(const OSEdit *edit); 22 | 23 | HBRUSH _osedit_background_color(const OSEdit *edit, COLORREF *color); 24 | 25 | void _osedit_kill_focus(const OSEdit *edit); 26 | 27 | __END_C 28 | 29 | -------------------------------------------------------------------------------- /src/osgui/win/oslabel.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oslabel.inl 8 | * 9 | */ 10 | 11 | /* Operating System label */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _oslabel_detach_and_destroy(OSLabel **label, OSPanel *panel); 18 | 19 | COLORREF _oslabel_color(const OSLabel *label); 20 | 21 | HBRUSH _oslabel_background_color(const OSLabel *label, COLORREF *color); 22 | 23 | __END_C 24 | 25 | -------------------------------------------------------------------------------- /src/osgui/win/osmenu.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osmenu.inl 8 | * 9 | */ 10 | 11 | /* Operating System native menu */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | HMENU _osmenu_hmenu(OSMenu *menu); 18 | 19 | HMENU _osmenu_menubar(OSMenu *menu, OSWindow *window); 20 | 21 | HMENU _osmenu_menubar_unlink(OSMenu *menu, OSWindow *window); 22 | 23 | void _osmenu_recompute(OSMenu *menu); 24 | 25 | void _osmenu_attach_to_item(OSMenu *menu, OSMenuItem *item); 26 | 27 | void _osmenu_detach_from_item(OSMenu *menu, OSMenuItem *item); 28 | 29 | void _osmenu_append_item(HMENU menu, const Font *font, const char_t *text, const Image *image, OSControl *owner); 30 | 31 | __END_C 32 | -------------------------------------------------------------------------------- /src/osgui/win/osmenuitem.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osmenuitem.inl 8 | * 9 | */ 10 | 11 | /* Operating System native menu item */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osmenuitem_insert_in_hmenu(OSMenuItem *item, OSMenu *menu); 18 | 19 | bool_t _osmenuitem_remove_from_hmenu(OSMenuItem *item, OSMenu *menu); 20 | 21 | void _osmenuitem_click(OSMenuItem *item, UINT id, UINT type, UINT state); 22 | 23 | void _osmenuitem_image_size(OSMenuItem *item, UINT id, UINT *width, UINT *height); 24 | 25 | void _osmenuitem_draw_image(OSMenuItem *item, UINT id, UINT state, HDC hdc, const RECT *rect); 26 | 27 | __END_C 28 | -------------------------------------------------------------------------------- /src/osgui/win/ospopup.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ospopup.inl 8 | * 9 | */ 10 | 11 | /* Operating System native popup button */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ospopup_detach_and_destroy(OSPopUp **popup, OSPanel *panel); 18 | 19 | void _ospopup_command(OSPopUp *popup, WPARAM wParam); 20 | 21 | HWND _ospopup_focus(OSPopUp *popup); 22 | 23 | __END_C 24 | 25 | -------------------------------------------------------------------------------- /src/osgui/win/osprogress.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osprogress.inl 8 | * 9 | */ 10 | 11 | /* Operating System native progress indicator */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osprogress_detach_and_destroy(OSProgress **progress, OSPanel *panel); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/win/osslider.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osslider.inl 8 | * 9 | */ 10 | 11 | /* Operating System native slider */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osslider_detach_and_destroy(OSSlider **slider, OSPanel *panel); 18 | 19 | void _osslider_message(OSSlider *slider, WPARAM wParam); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/win/ostext.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ostext.inl 8 | * 9 | */ 10 | 11 | /* Operating System textview */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ostext_detach_and_destroy(OSText **view, OSPanel *panel); 18 | 19 | void _ostext_command(OSText *view, WPARAM wParam); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/win/ostooltip.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: ostooltip.inl 8 | * 9 | */ 10 | 11 | /* Tooltips */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _ostooltip_set_text(HWND *tooltip_hwnd, HWND control_hwnd, const char_t *text); 18 | 19 | void _ostooltip_destroy_optional(HWND *tooltip_hwnd, HWND control_hwnd); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/win/osupdown.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osupdown.inl 8 | * 9 | */ 10 | 11 | /* Operating System native updown */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osupdown_detach_and_destroy(OSUpDown **updown, OSPanel *panel); 18 | 19 | void _osupdown_OnNotification(OSUpDown *updown, const NMHDR *nmhdr, LPARAM lParam); 20 | 21 | __END_C 22 | 23 | -------------------------------------------------------------------------------- /src/osgui/win/osview.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: osview.inl 8 | * 9 | */ 10 | 11 | /* Operating System native custom view */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _osview_detach_and_destroy(OSView **view, OSPanel *panel); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/osgui/win/oswindow.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: oswindow.inl 8 | * 9 | */ 10 | 11 | /* Operating System native window */ 12 | 13 | #include "osgui_win.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void _oswindow_set_menubar(OSWindow *window, HMENU hmenu); 18 | 19 | void _oswindow_unset_menubar(OSWindow *window, HMENU hmenu); 20 | 21 | void _oswindow_change_menubar(OSWindow *window, HMENU prev_hmenu, HMENU new_hmenu); 22 | 23 | HWND _oswindow_set_current_popup_menu(OSWindow *window, HMENU hmenu); 24 | 25 | HWND _oswindow_hwnd(OSWindow *window); 26 | 27 | bool_t _oswindow_proccess_message(MSG *msg, HACCEL accelerator_table); 28 | 29 | bool_t _oswindow_in_resizing(HWND child_hwnd); 30 | 31 | __END_C 32 | 33 | -------------------------------------------------------------------------------- /src/sewer/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir unix 4 | subdir win 5 | 6 | let sources * : SourceSet { 7 | .sources = [ 8 | ./bmath.cpp 9 | ./sewer.cpp 10 | ./blib.c 11 | ./bmem.c 12 | ./cassert.c 13 | ./ptr.c 14 | ./qsort.c 15 | ./types.c 16 | ./unicode.c 17 | ] 18 | .configs += ^main_config 19 | 20 | if (target_os == `linux) || (target_os == `macos) { 21 | .deps += unix.sources 22 | }else if target_os == `win32 { 23 | .deps += win.sources 24 | }else { 25 | error("target os not supported") 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/sewer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(sewer "") -------------------------------------------------------------------------------- /src/sewer/blib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochus-keller/nappgui/5d27dff8532c12ce44aadf5c1c34cee8efe482a2/src/sewer/blib.c -------------------------------------------------------------------------------- /src/sewer/bmath.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bmath.inl 8 | * 9 | */ 10 | 11 | /* Math funcions */ 12 | 13 | #include "sewer.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void bmath_finish(void); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/sewer/bmem.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bmem.inl 8 | * 9 | */ 10 | 11 | /* Operating System memory support */ 12 | 13 | __EXTERN_C 14 | 15 | void _bmem_start(void); 16 | 17 | void _bmem_finish(void); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/sewer/qsort.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: qsort.inl 8 | * 9 | */ 10 | 11 | /* Quick sort with data */ 12 | 13 | #include "sewer.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void _qsort_ex(const void *data, const uint32_t num_elems, const uint32_t sizeof_elem, FPtr_compare_ex func_compare, const void *user_data); 18 | 19 | __END_C 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/sewer/sewer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: sewer.h 8 | * https://nappgui.com/en/sewer/sewer.html 9 | * 10 | */ 11 | 12 | /* Sewer library */ 13 | 14 | #include "sewer.hxx" 15 | 16 | __EXTERN_C 17 | 18 | void sewer_start(void); 19 | 20 | void sewer_finish(void); 21 | 22 | __END_C 23 | 24 | -------------------------------------------------------------------------------- /src/sewer/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: types.h 8 | * 9 | */ 10 | 11 | /* Basic types utils */ 12 | 13 | #include "sewer.hxx" 14 | 15 | #define max_val(x, y) ((x) > (y)) ? (x) : (y) 16 | 17 | #define min_val(x, y) ((x) < (y)) ? (x) : (y) 18 | 19 | __EXTERN_C 20 | 21 | uint32_t min_u32(const uint32_t v1, const uint32_t v2); 22 | 23 | real32_t min_r32(const real32_t v1, const real32_t v2); 24 | 25 | real64_t min_r64(const real64_t v1, const real64_t v2); 26 | 27 | uint32_t max_u32(const uint32_t v1, const uint32_t v2); 28 | 29 | real32_t max_r32(const real32_t v1, const real32_t v2); 30 | 31 | real64_t max_r64(const real64_t v1, const real64_t v2); 32 | 33 | real32_t abs_r32(const real32_t v); 34 | 35 | uint8_t to_u8(const uint32_t v); 36 | 37 | __END_C 38 | -------------------------------------------------------------------------------- /src/sewer/unix/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./bstdimp.c 6 | ./bmem_unix.c 7 | ] 8 | .configs += ^main_config 9 | } 10 | -------------------------------------------------------------------------------- /src/sewer/win/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./bmem_win.c 6 | ./bstdimp.c 7 | ] 8 | .configs += ^main_config 9 | } 10 | -------------------------------------------------------------------------------- /src/utils/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | subdir nlib 4 | subdir nrc 5 | 6 | let sources * : SourceSet { 7 | .deps += [ nlib.sources ] 8 | .sources += ./nrc/nrc.c 9 | .include_dirs += ./nlib 10 | .configs += ^main_config 11 | } 12 | -------------------------------------------------------------------------------- /src/utils/nlib/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | let sources * : SourceSet { 4 | .sources = [ 5 | ./bnfparser.c 6 | ./msgparser.c 7 | ./nglob.c 8 | ./nrclib.c 9 | ./resgen.c 10 | ./ssh.c 11 | ] 12 | .configs += ^main_config 13 | } 14 | -------------------------------------------------------------------------------- /src/utils/nlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processStaticLib(nlib "core") -------------------------------------------------------------------------------- /src/utils/nlib/bnfparser.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: bnfparser.inl 8 | * 9 | */ 10 | 11 | /* Parser generator from BNF */ 12 | 13 | #include "nlib.ixx" 14 | 15 | __EXTERN_C 16 | 17 | bool_t bnfparser_create(Stream *stm, const char_t *dest_file, String **error); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/utils/nlib/msgparser.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: msgparser.inl 8 | * 9 | */ 10 | 11 | /* Message files parser */ 12 | 13 | #include "nlib.ixx" 14 | 15 | __EXTERN_C 16 | 17 | void msgparser_process(const char_t *filepath, const char_t *file_data, const uint32_t file_size, ArrPt(String) **ids, ArrPt(String) **texts, ArrPt(String) *errors); 18 | 19 | __END_C 20 | 21 | -------------------------------------------------------------------------------- /src/utils/nlib/nglob.c: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: nglob.c 8 | * 9 | */ 10 | 11 | /* NAppGUI project globals */ 12 | 13 | #include "nglob.h" 14 | #include "btime.h" 15 | #include "strings.h" 16 | 17 | /*---------------------------------------------------------------------------*/ 18 | 19 | uint32_t nglob_begin_year(void) 20 | { 21 | return 2015; 22 | } 23 | 24 | /*---------------------------------------------------------------------------*/ 25 | 26 | String *nglob_copyright(void) 27 | { 28 | Date date; 29 | btime_date(&date); 30 | return str_printf("(CC) %d-%d Francisco Garcia Collado", nglob_begin_year(), date.year); 31 | } 32 | -------------------------------------------------------------------------------- /src/utils/nlib/nglob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: nglob.h 8 | * 9 | */ 10 | 11 | /* NAppGUI project globals */ 12 | 13 | #include "nlib.hxx" 14 | 15 | __EXTERN_C 16 | 17 | uint32_t nglob_begin_year(void); 18 | 19 | String *nglob_copyright(void); 20 | 21 | __END_C 22 | -------------------------------------------------------------------------------- /src/utils/nlib/nlib.hxx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: nlib.hxx 8 | * 9 | */ 10 | 11 | /* Commons for NAppGUI Utilities */ 12 | 13 | #ifndef __NLIB_HXX__ 14 | #define __NLIB_HXX__ 15 | 16 | #include "core.hxx" 17 | 18 | typedef struct _login_t Login; 19 | 20 | struct _login_t 21 | { 22 | String *ip; 23 | String *user; 24 | String *pass; 25 | platform_t platform; 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/utils/nlib/nlib.ixx: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: nlib.ixx 8 | * 9 | */ 10 | 11 | /* Commons for NAppGUI Utilities */ 12 | 13 | #ifndef __NLIB_IXX__ 14 | #define __NLIB_IXX__ 15 | 16 | #include "nlib.hxx" 17 | 18 | typedef struct _resource_pack_t ResourcePack; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/utils/nlib/nrclib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NAppGUI Cross-platform C SDK 3 | * 2015-2022 Francisco Garcia Collado 4 | * MIT Licence 5 | * https://nappgui.com/en/legal/license.html 6 | * 7 | * File: nrclib.h 8 | * 9 | */ 10 | 11 | /* Resource compiler logic */ 12 | 13 | #include "nlib.hxx" 14 | 15 | __EXTERN_C 16 | 17 | void nrclib_serial_dir(const char_t *src_dir, const char_t *dest_file, ArrPt(String) **warnings, ArrPt(String) **errors); 18 | 19 | void nrclib_pack_dir(const char_t *src_dir, const char_t *dest_file, ArrPt(String) **warnings, ArrPt(String) **errors); 20 | 21 | bool_t nrclib_bnfparser(const char_t *src_file, const char_t *dest_file, String **error); 22 | 23 | __END_C 24 | -------------------------------------------------------------------------------- /src/utils/nrc.pro: -------------------------------------------------------------------------------- 1 | 2 | QT -= core 3 | QT -= gui 4 | 5 | TARGET = nrc_ 6 | CONFIG += console 7 | CONFIG -= app_bundle 8 | CONFIG += object_parallel_to_source #https://wiki.qt.io/Undocumented_QMake; if your version doesn't support, rename osbs/unix/sinfo.c and bsocket.c 9 | 10 | DEFINES += CMAKE_RELEASE NAPPGUI_BUILD 11 | INCLUDEPATH += nlib ../core ../osbs ../sewer 12 | 13 | TEMPLATE = app 14 | 15 | SOURCES += \ 16 | nrc/nrc.c \ 17 | nlib/bnfparser.c \ 18 | nlib/msgparser.c \ 19 | nlib/nglob.c \ 20 | nlib/nrclib.c \ 21 | nlib/resgen.c \ 22 | nlib/ssh.c 23 | 24 | include(core.pri) 25 | -------------------------------------------------------------------------------- /src/utils/nrc/BUSY: -------------------------------------------------------------------------------- 1 | # see https://github.com/rochus-keller/BUSY/ 2 | 3 | -------------------------------------------------------------------------------- /src/utils/nrc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | processCommandApp(nrc "utils/nlib") --------------------------------------------------------------------------------