diff options
Diffstat (limited to 'libs/tinyfiledialogs')
25 files changed, 0 insertions, 2148 deletions
diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/LUA_plugin.tinyfiledialogs.cpp b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/LUA_plugin.tinyfiledialogs.cpp deleted file mode 100644 index 036f0ca..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/LUA_plugin.tinyfiledialogs.cpp +++ /dev/null @@ -1,287 +0,0 @@ -/* SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - _________ - / \ LUA_plugin.tinyfiledialogs.cpp v3.8.3 [Nov 1, 2020] - |tiny file| LUA bindings created [2016] Copyright (c) 2016 Steven Johnson - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - ____________________________________________ - | | - | email: tinyfiledialogs at ysengrin.com | - |____________________________________________| - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - -- License - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. ------------ - -this file was contributed by Steven Johnson from the Corona SDK project -and is offered here under the same zlib license as tinyfiledialogs - --#include "CoronaLua.h" will typically be something like -extern "C" { -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" -} - -in a normal(i.e.non - Corona) program. -- For that matter, CORONA_EXPORT just hides the library exporting code. -- The "_plugin_" stuff is part of a signature used by Corona to dynamically load the entry point function, but might be out -of place in a non - Corona program. -*/ - - -#include "CoronaLua.h" -#include "tinyfiledialogs.h" -#include <string.h> - -#define STATIC_FILTER_COUNT 8 - -static int GetBool (lua_State * L, const char * key) -{ - lua_getfield(L, 1, key);// ..., bool - - int bval = lua_toboolean(L, -1); - - lua_pop(L, 1); // ... - - return bval; -} - -static const char * GetStrOrBlank (lua_State * L, const char * key, const char * blank = "") -{ - lua_getfield(L, 1, key);// ..., str? - - const char * str = blank; // might be NULL, thus not using luaL_optstring - - if (!lua_isnil(L, -1)) str = luaL_checkstring(L, -1); - - lua_pop(L, 1); - - return str; -} - -static int GetFilters (lua_State * L, const char *** filters) -{ - int nfilters = 0; - - lua_getfield(L, 1, "filter_patterns"); // ..., patts - - if (lua_istable(L, -1)) - { - int n = lua_objlen(L, -1); - - if (n > STATIC_FILTER_COUNT) *filters = (const char **)lua_newuserdata(L, sizeof(const char *) * n);// ..., patts, filters - - for (int i = 1; i <= n; ++i, lua_pop(L, 1)) - { - lua_rawgeti(L, -1, i); // ..., patts[, filters], patt - - (*filters)[nfilters++] = luaL_checkstring(L, -1); - } - } - - else if (!lua_isnil(L, -1)) (*filters)[nfilters++] = luaL_checkstring(L, -1); - - return nfilters; -} - -static int StringResponse (lua_State * L, const char * res) -{ - if (!res) lua_pushboolean(L, 0);// ..., false - - else lua_pushstring(L, res);// ..., res - - return 1; -} - -static luaL_Reg tfd_funcs[] = { - { - "notifyPopup", [](lua_State * L) - { - luaL_checktype(L, 1, LUA_TTABLE); - - const char * title = GetStrOrBlank(L, "title"); - const char * message = GetStrOrBlank(L, "message"); - const char * icon_types[] = { "info", "warning", "error" }; - - lua_getfield(L, 1, "icon_type"); // opts, icon_type - - const char * itype = icon_types[luaL_checkoption(L, -1, "info", icon_types)]; - - lua_pushboolean(L, tinyfd_notifyPopup(title, message, itype)); // opts, icon_type - - return 1; - } - }, { - "messageBox", [](lua_State * L) - { - luaL_checktype(L, 1, LUA_TTABLE); - - const char * title = GetStrOrBlank(L, "title"); - const char * message = GetStrOrBlank(L, "message"); - const char * dialog_types[] = { "ok", "okcancel", "yesno", "yesnocancel" }; - const char * icon_types[] = { "info", "warning", "error", "question" }; - - lua_getfield(L, 1, "dialog_type"); // opts, dialog_type - lua_getfield(L, 1, "icon_type");// opts, dialog_type, icon_type - - const char * dtype = dialog_types[luaL_checkoption(L, -2, "ok", dialog_types)]; - const char * itype = icon_types[luaL_checkoption(L, -1, "info", icon_types)]; - - lua_pushboolean(L, tinyfd_messageBox(title, message, dtype, itype, GetBool(L, "default_okyes"))); // opts, dialog_type, icon_type, ok / yes - - return 1; - } - }, { - "inputBox", [](lua_State * L) - { - luaL_checktype(L, 1, LUA_TTABLE); - - const char * title = GetStrOrBlank(L, "title"); - const char * message = GetStrOrBlank(L, "message"); - - // - lua_getfield(L, 1, "default_input");// opts, def_input - - const char * def_input; - - if (lua_type(L, -1) == LUA_TBOOLEAN && !lua_toboolean(L, -1)) def_input = NULL; - - else def_input = luaL_optstring(L, -1, ""); - - return StringResponse(L, tinyfd_inputBox(title, message, def_input)); // opts, def_input, input - } - }, { - "saveFileDialog", [](lua_State * L) - { - luaL_checktype(L, 1, LUA_TTABLE); - - const char * title = GetStrOrBlank(L, "title"); - const char * def_path_and_file = GetStrOrBlank(L, "default_path_and_file"); - const char * filter_description = GetStrOrBlank(L, "filter_description", NULL); - const char * filter_array[STATIC_FILTER_COUNT] = { 0 }, ** filters = filter_array; - int nfilters = GetFilters(L, &filters); // opts, patts[, filters] - - return StringResponse(L, tinyfd_saveFileDialog(title, def_path_and_file, nfilters, filters, filter_description)); // opts, patts[, filters], file - } - }, { - "openFileDialog", [](lua_State * L) - { - luaL_checktype(L, 1, LUA_TTABLE); - - // - const char * title = GetStrOrBlank(L, "title"); - const char * def_path_and_file = GetStrOrBlank(L, "default_path_and_file"); - const char * filter_description = GetStrOrBlank(L, "filter_description", NULL); - const char * filter_array[STATIC_FILTER_COUNT] = { 0 }, ** filters = filter_array; - int allow_multiple_selects = GetBool(L, "allow_multiple_selects"); - int nfilters = GetFilters(L, &filters); // opts, patts[, filters] - - // - const char * files = tinyfd_openFileDialog(title, def_path_and_file, nfilters, nfilters ? filters : NULL, filter_description, allow_multiple_selects); - - if (!allow_multiple_selects || !files) return StringResponse(L, files); // opts, patts[, filters], files? - - else - { - lua_newtable(L);// opts, patts[, filters], files - - char * from = (char *)files, * sep = from; // assign sep in order to pass first iteration - - for (int fi = 1; sep; ++fi) - { - sep = strchr(from, '|'); - - if (sep) - { - lua_pushlstring(L, from, sep - from); // opts, patts[, filters], files, file - - from = sep + 1; - } - - else lua_pushstring(L, from);// opts, patts[, filters], files, file - - lua_rawseti(L, -2, fi); // opts, patts[, filters], files = { ..., file } - } - } - - return 1; - } - }, { - "selectFolderDialog", [](lua_State * L) - { - luaL_checktype(L, 1, LUA_TTABLE); - - const char * title = GetStrOrBlank(L, "title"); - const char * def_path = GetStrOrBlank(L, "default_path"); - - return StringResponse(L, tinyfd_selectFolderDialog(title, def_path)); // opts, folder - } - }, { - "colorChooser", [](lua_State * L) - { - luaL_checktype(L, 1, LUA_TTABLE); - lua_settop(L, 1); // opts - lua_getfield(L, 1, "out_rgb"); // opts, out - - const char * title = GetStrOrBlank(L, "title"); - - // - unsigned char rgb[3]; - - lua_getfield(L, 1, "rgb"); // opts, out, rgb - - const char * def_hex_rgb = NULL; - - if (lua_istable(L, 3)) - { - lua_getfield(L, 3, "r");// opts, out, rgb, r - lua_getfield(L, 3, "g");// opts, out, rgb, r, g - lua_getfield(L, 3, "b");// opts, out, rgb, r, g, b - - for (int i = 1; i <= 3; ++i) rgb[i - 1] = (unsigned char)(luaL_checknumber(L, 3 + i) * 255.0); - } - - else def_hex_rgb = luaL_optstring(L, 3, "#000000"); - - const char * color = tinyfd_colorChooser(title, def_hex_rgb, rgb, rgb); - - if (color && lua_istable(L, 2)) - { - for (int i = 0; i < 3; ++i) lua_pushnumber(L, (double)rgb[i] / 255.0); // opts, out, rgb[, r, g, b], rout, gout, bout - - lua_setfield(L, 2, "b");// opts, out, rgb[, r, g, b], rout, gout - lua_setfield(L, 2, "g");// opts, out, rgb[, r, g, b], rout - lua_setfield(L, 2, "r");// opts, out, rgb[, r, g, b] - } - - return StringResponse(L, color);// opts, out, rgb[, r, g, b], color - } - }, - { NULL, NULL } -}; - -CORONA_EXPORT int luaopen_plugin_tinyfiledialogs(lua_State* L) -{ - lua_newtable(L);// t - luaL_register(L, NULL, tfd_funcs); - - return 1; -} diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/PascalABC/tinyfd.pas b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/PascalABC/tinyfd.pas deleted file mode 100644 index 3fdee61..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/PascalABC/tinyfd.pas +++ /dev/null @@ -1,56 +0,0 @@ -{ SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - -found on this page: - https://github.com/pascalabcnet/pascalabcnet/discussions/2782 -} - -unit tinyfd; - -uses System; - -procedure tinyfd_beep(); external 'tinyfiledialogs64.dll'; - -function tinyfd_notifyPopup(aTitle: string; - aMessage: string; - aIconType: string): integer; - external 'tinyfiledialogs64.dll'; - -function tinyfd_messageBox(aTitle: string; - aMessage: string; - aDialogTyle: string; - aIconType: string; - aDefaultButton: integer): integer; - external 'tinyfiledialogs64.dll'; - -function tinyfd_inputBox(aTitle: string; - aMessage: string; - aDefaultInput: string): IntPtr; - external 'tinyfiledialogs64.dll'; - -function tinyfd_saveFileDialog(aTitle: string; - aDefaultPathAndFile: string; - aNumOfFilterPatterns: integer; - aFilterPatterns: array of string; - aSingleFilterDescription: string): IntPtr; - external 'tinyfiledialogs64.dll'; - -function tinyfd_openFileDialog(aTitle: string; - aDefaultPathAndFile: string; - aNumOfFilterPatterns: integer; - aFilterPatterns: array of string; - aSingleFilterDescription: string; - aAllowMultipleSelects: integer): IntPtr; - external 'tinyfiledialogs64.dll'; - -function tinyfd_selectFolderDialog(aTitle: string; - aDefaultPathAndFile: string): IntPtr; - external 'tinyfiledialogs64.dll'; - -function tinyfd_colorChooser(aTitle: string; - aDefaultHexRGB: string; - aDefaultRGB: array of byte; - aoResultRGB: array of byte): IntPtr; - external 'tinyfiledialogs64.dll'; - -end. diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/fortran/tinyfd_main.f90 b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/fortran/tinyfd_main.f90 deleted file mode 100644 index a4845ef..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/fortran/tinyfd_main.f90 +++ /dev/null @@ -1,185 +0,0 @@ -! SPDX-License-Identifier: ZLIB -! Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com -! _________ -! / \ tinyfiledialogs v3.18.1 [May 26, 2024] -! |tiny file| -! | dialogs | -! \____ ___/ http://tinyfiledialogs.sourceforge.net -! \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - -! - License - -! This software is provided 'as-is', without any express or implied -! warranty. In no event will the authors be held liable for any damages -! arising from the use of this software. -! Permission is granted to anyone to use this software for any purpose, -! including commercial applications, and to alter it and redistribute it -! freely, subject to the following restrictions: -! 1. The origin of this software must not be misrepresented; you must not -! claim that you wrote the original software. If you use this software -! in a product, an acknowledgment in the product documentation would be -! appreciated but is not required. -! 2. Altered source versions must be plainly marked as such, and must not be -! misrepresented as being the original software. -! 3. This notice may not be removed or altered from any source distribution. -! ___________________________________________________________ -! | | -! | If you like this new FORTRAN module please upvote | -! | my stackoverflow answer on the FORTRAN post | -! | https://stackoverflow.com/a/59657117 | -! |___________________________________________________________| - -! See compilation instructions at the end of this file - - program main - use tinyfd - use iso_c_binding, only: c_ptr, c_null_char, c_f_pointer, c_loc, c_null_ptr, c_associated, c_int, c_char - implicit none - type(c_ptr) :: cpointer - character(512), pointer :: fpointer - character(128), target :: aDefaultInput - character(512) :: string, aMessage, aDefaultPath, aDefaultPathAndFile - character(128) :: aTitle, aDialogType, aIconType - character(128) :: aSingleFilterDescription - integer :: i, aInteger, aButtonPressed, aDefaultButton, aNumOfFilterPatterns, aAllowMultipleSelects - character(8) :: aDefaultHexRGB - character(3) :: aDefaultRGB, aoResultRGB - type (c_ptr), dimension(:), allocatable :: aFilterPatterns - character(len=16,kind=c_char), allocatable, target :: lExtensions(:) - - ! calling subroutine tinyfd_beep (it doesn't return anything: it's a subroutine') - write(*,'(A)') "Enter tinyfd_beep()" - call tinyfd_beep() - - ! calling function tinyfd_notifyPopup (it returns one value: it's a function') - write(*,'(A)') "Enter tinyfd_notifyPopup()" - aTitle = "a Title" // char(0) - aMessage = "a Message" // char(0) - aIconType = "info" // char(0) - aInteger = tinyfd_notifyPopup(aTitle, aMessage, aIconType ) - - ! calling function tinyfd_messageBox - write(*,'(A)') "Enter tinyfd_messageBox()" - aTitle = "a Title" // char(0) - aMessage = "a Message" // char(0) - aIconType = "info" // char(0) - aDialogType = "ok" // char(0) - aDefaultButton = 1 - aButtonPressed = tinyfd_messageBox(aTitle, aMessage, aDialogType, aIconType, aDefaultButton ) - write (*,*) aButtonPressed - - ! calling function tinyfd_inputbox - write(*,'(A)') "Enter tinyfd_inputbox()" - aTitle = "a Title" // char(0) - aMessage = "a Message" // char(0) - aDefaultInput = "an Input" // char(0) - cpointer = tinyfd_inputBox(aTitle, aMessage, c_loc(aDefaultInput) ) - ! or for a password box: cpointer = tinyfd_inputbox(atitle, amessage, c_null_ptr ) - if ( c_associated(cpointer) ) then - call c_f_pointer(cpointer, fpointer) ! Convert C Pointer to Fortran pointer - string = fpointer(1:index(fpointer,c_null_char)-1) ! Remove NULL character at the end - write (*,'(A)') string - endif - - ! calling function tinyfd_saveFileDialog - write(*,'(A)') "Enter tinyfd_saveFileDialog()" - aTitle = "a Title" // char(0) - aDefaultPathAndFile = "" // char(0) - aSingleFilterDescription = "" // char(0) ! or "Text Files" // char(0) - aNumOfFilterPatterns = 2 - allocate (lExtensions( aNumOfFilterPatterns )) - allocate (aFilterPatterns( aNumOfFilterPatterns )) - lExtensions(1) = "*.txt" // char(0) - lExtensions(2) = "*.doc" // char(0) - do i = 1, aNumOfFilterPatterns, 1 - aFilterPatterns(i) = c_loc(lExtensions(i)) - write (*,'(A)') lExtensions(i) - !write (*,*) aFilterPatterns(i) - end do - cpointer = tinyfd_saveFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription) - ! or cpointer = tinyfd_saveFileDialog(aTitle, aDefaultPathAndFile, 0, c_null_ptr, aSingleFilterDescription) - deallocate (aFilterPatterns) - deallocate (lExtensions) - if ( c_associated(cpointer) ) then - call c_f_pointer(cpointer, fpointer) ! Convert C Pointer to Fortran pointer - string = fpointer(1:index(fpointer,c_null_char)-1) ! Remove NULL character at the end - write (*,'(A)') string - endif - - ! calling function tinyfd_openFileDialog - write(*,'(A)') "Enter tinyfd_openFileDialog()" - aTitle = "a Title" // char(0) - aDefaultPathAndFile = "" // char(0) - aAllowMultipleSelects = 1 - aSingleFilterDescription = "" // char(0) ! or "Text Files" // char(0) - aNumOfFilterPatterns = 2 - allocate (lExtensions( aNumOfFilterPatterns )) - allocate (aFilterPatterns( aNumOfFilterPatterns )) - lExtensions(1) = "*.txt" // char(0) - lExtensions(2) = "*.doc" // char(0) - do i = 1, aNumOfFilterPatterns, 1 - aFilterPatterns(i) = c_loc(lExtensions(i)) - write (*,'(A)') lExtensions(i) - !write (*,*) aFilterPatterns(i) - end do - cpointer = tinyfd_openFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, & - aSingleFilterDescription, aAllowMultipleSelects) - ! or cpointer = tinyfd_openFileDialog(aTitle, aDefaultPathAndFile, 0, c_null_ptr, aSingleFilterDescription, aAllowMultipleSelects) - deallocate (aFilterPatterns) - deallocate (lExtensions) - if ( c_associated(cpointer) ) then - call c_f_pointer(cpointer, fpointer) ! Convert C Pointer to Fortran pointer - string = fpointer(1:index(fpointer,c_null_char)-1) ! Remove NULL character at the end - write (*,'(A)') string - endif - - ! calling function tinyfd_selectFolderDialog - write(*,'(A)') "Enter tinyfd_selectFolderDialog()" - aTitle = "a Title" // char(0) - aDefaultPath = "" // char(0) - cpointer = tinyfd_selectFolderDialog(aTitle, aDefaultPath ) - if ( c_associated(cpointer) ) then - call c_f_pointer(cpointer, fpointer) ! Convert C Pointer to Fortran pointer - string = fpointer(1:index(fpointer,c_null_char)-1) ! Remove NULL character at the end - write (*,'(A)') string - endif - - ! calling function tinyfd_colorChooser - write(*,'(A)') "Enter tinyfd_colorChooser()" - aTitle = "a Title" // char(0) - aDefaultHexRGB = "" // char(0) ! or "#FF0000" // char(0) - aDefaultRGB = char(0) // char(0) // char(255) - print *, "aDefaultRGB", IACHAR(aDefaultRGB(1:1)), IACHAR(aDefaultRGB(2:2)), IACHAR(aDefaultRGB(3:3)) - cpointer = tinyfd_colorChooser(aTitle, aDefaultHexRGB, aDefaultRGB, aoResultRGB ) - print *, "aoResultRGB", IACHAR(aoResultRGB(1:1)), IACHAR(aoResultRGB(2:2)), IACHAR(aoResultRGB(3:3)) - if ( c_associated(cpointer) ) then - call c_f_pointer(cpointer, fpointer) ! Convert C Pointer to Fortran pointer - string = fpointer(1:index(fpointer,c_null_char)-1) ! Remove NULL character at the end - write (*,'(A)') string(1:10) - write (*,*) string - endif - - end program main - -! gcc -c ../../tinyfiledialogs.c -! gfortran -c tinyfd_module.f90 tinyfd_main.f90 -! gfortran -o tinyfd_exe tinyfd_module.o tinyfiledialogs.o tinyfd_main.o - -! or in one line : gfortran -o tinyfd_exe tinyfd_module.f90 ../../tinyfiledialogs.c tinyfd_main.f90 - -! This works on VisualStudio with Intel Fortran (make sure the C project has very similar settings as your fortran project): - ________________________________________________________________________ -! 1) | Install The Windows SDK | -! | http://developer.microsoft.com/en-us/windows/downloads/windows-sdk | -! | The end user doesn't need to install anythings | -! |________________________________________________________________________| -! 2) Create a new empty C/C++ project, verify the configuration is for X64. -! 3) Add existing files: tinyfiledialogs.c and tinyfiledialogs.h -! 4) Build this project. It will fail because there is no main(), -! but it will create tinyfiledialogs.obj -! 5) Create a new empty Fortran project, verify the configuration is for X64. -! 6) Add existing file: tinyfiledialogs.obj - the one that was created on 4) -! 7) Add existing files: tinyfd_module.f90 and tinyfd_main.f90 -! 8) In the properties of this fortran project, in the linker input field, -! add: comdlg32.lib ole32.lib user32.lib shell32.lib -! or maybe add: %(AdditionalDependencies) -! 9) Build and Run. Voila ! diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/fortran/tinyfd_module.f90 b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/fortran/tinyfd_module.f90 deleted file mode 100644 index 102f921..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/fortran/tinyfd_module.f90 +++ /dev/null @@ -1,101 +0,0 @@ -! SPDX-License-Identifier: ZLIB -! Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com -! _________ -! / \ tinyfiledialogs v3.18.1 [Mar 26, 2024] -! |tiny file| -! | dialogs | -! \____ ___/ http://tinyfiledialogs.sourceforge.net -! \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - -! - License - -! This software is provided 'as-is', without any express or implied -! warranty. In no event will the authors be held liable for any damages -! arising from the use of this software. -! Permission is granted to anyone to use this software for any purpose, -! including commercial applications, and to alter it and redistribute it -! freely, subject to the following restrictions: -! 1. The origin of this software must not be misrepresented; you must not -! claim that you wrote the original software. If you use this software -! in a product, an acknowledgment in the product documentation would be -! appreciated but is not required. -! 2. Altered source versions must be plainly marked as such, and must not be -! misrepresented as being the original software. -! 3. This notice may not be removed or altered from any source distribution. -! ___________________________________________________________ -! | | -! | If you like this new FORTRAN module please upvote | -! | my stackoverflow answer on the FORTRAN post | -! | https://stackoverflow.com/a/59657117 | -! |___________________________________________________________| - -! See compilation instructions at the end of tinyfd_main.f90 - - module tinyfd - interface ! C interface - - ! it doesn't return anything -> it's a subroutine - subroutine tinyfd_beep() bind(C, name='tinyfd_beep') - implicit none - end subroutine tinyfd_beep - - ! it returns one value -> it's a function - integer function tinyfd_notifyPopup(aTitle, aMessage, aIconType) bind(c, NAME='tinyfd_notifyPopup') - use iso_c_binding, only: c_char - implicit none - character (kind=c_char, len=1) :: aTitle, aMessage, aIconType - end function tinyfd_notifyPopup - - ! it returns one value -> it's a function - integer function tinyfd_messageBox(aTitle, aMessage, aDialogType, aIconType, aDefaultButton) bind(c,NAME='tinyfd_messageBox') - use iso_c_binding, only: c_char, c_int - implicit none - character (kind=c_char, len=1) :: aTitle, aMessage, aDialogType, aIconType - integer(c_int), value :: aDefaultButton - end function tinyfd_messageBox - - ! it returns one value -> it's a function - type(c_ptr) function tinyfd_inputBox(aTitle, aMessage, aDefaultInput) bind(c,NAME='tinyfd_inputBox') - use iso_c_binding, only: c_ptr, c_char - implicit none - character (kind=c_char, len=1) :: aTitle, aMessage - ! aDefaultInput is a bit different because we need to be able - ! to pass c_null_ptr to obtain a password box instead of an input box - type(c_ptr), value :: aDefaultInput - end function tinyfd_inputBox - - ! it returns one value -> it's a function - type(c_ptr) function tinyfd_saveFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, & - aSingleFilterDescription) bind(c,NAME='tinyfd_saveFileDialog') - use iso_c_binding, only: c_ptr, c_char, c_int - implicit none - integer(c_int), value :: aNumOfFilterPatterns - character (kind=c_char, len=1) :: aTitle, aDefaultPathAndFile, aSingleFilterDescription - type (c_ptr), dimension(*) :: aFilterPatterns - end function tinyfd_saveFileDialog - - ! it returns one value -> it's a function - type(c_ptr) function tinyfd_openFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, & - aSingleFilterDescription, aAllowMultipleSelects) bind(c,NAME='tinyfd_openFileDialog') - use iso_c_binding, only: c_ptr, c_char, c_int - implicit none - integer(c_int), value :: aNumOfFilterPatterns, aAllowMultipleSelects - character (kind=c_char, len=1) :: aTitle, aDefaultPathAndFile, aSingleFilterDescription - type (c_ptr), dimension(*) :: aFilterPatterns - end function tinyfd_openFileDialog - - ! it returns one value -> it's a function - type(c_ptr) function tinyfd_selectFolderDialog(aTitle, aDefaultPath) bind(c,NAME='tinyfd_selectFolderDialog') - use iso_c_binding, only: c_ptr, c_char - implicit none - character (kind=c_char, len=1) :: aTitle, aDefaultPath - end function tinyfd_selectFolderDialog - - ! it returns one value -> it's a function - type(c_ptr) function tinyfd_colorChooser(aTitle, aDefaultHexRGB, aDefaultRGB, aoResultRGB) bind(c,NAME='tinyfd_colorChooser') - use iso_c_binding, only: c_ptr, c_char, c_int - implicit none - character (kind=c_char, len=1) :: aTitle, aDefaultHexRGB, aDefaultRGB, aoResultRGB - end function tinyfd_colorChooser - - end interface ! C interface - end module tinyfd diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/freepascal/hello.pas b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/freepascal/hello.pas deleted file mode 100644 index a43c478..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/freepascal/hello.pas +++ /dev/null @@ -1,91 +0,0 @@ -{ SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - _________ - / \ tinyfiledialogs v3.13 [May 2, 2023] zlib licence - |tiny file| - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - - - License - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - ___________________________________________________________ - | | - | If you like this new PASCAL module please upvote | - | my stackoverflow answer on the PASCAL post | - | https://stackoverflow.com/a/59657117 | - |___________________________________________________________| - - See compilation instructions at the end of this file -} - -program Hello ; - -uses tinyfd ; - -var - lReturnedChar : Pchar; - lReturnedValue : Integer ; - lCReturnedString: String ; - lArrayOfChar: array[0..2] of byte = (0,0,255); - -begin - writeln ('Hello tinyfd'); - tinyfd_beep(); - - lReturnedChar := tinyfd_inputBox('tinyfd_query', '', ''); - writeln (tinyfd_response); - if lReturnedChar <> nil then - lReturnedValue := tinyfd_messageBox('Graphic Mode',tinyfd_response, 'okcancel', 'info', 1) - else - lReturnedValue := tinyfd_messageBox('Console Mode',tinyfd_response, 'okcancel', 'info', 1); - - if lReturnedValue = 0 then exit; - - lReturnedValue := tinyfd_messageBox('A tinyfd title','graphic dialogs [Yes] / console mode [No]', 'yesno', 'question', 1); - if lReturnedValue = 0 then tinyfd_forceConsole := 1 ; - - tinyfd_notifyPopup('A tinyfd title', 'This is a notification', 'warning'); - - lReturnedChar := tinyfd_inputBox('A tinyfd title','This is an input box', ''); - if lReturnedChar = nil then exit; { detect cancel was pressed - no input is allowed } - lCReturnedString := StrPas(lReturnedChar); - writeln (lCReturnedString); - - lCReturnedString := tinyfd_inputBox('A tinyfd title','This is a password box', nil); - writeln (lCReturnedString); - if Length(lCReturnedString) = 0 then exit; { detect no input } - - lCReturnedString := tinyfd_saveFileDialog('Choose a filename to save to','lala.txt', 0, nil,nil); - writeln (lCReturnedString); - if Length(lCReturnedString) = 0 then exit; - - lCReturnedString := tinyfd_openFileDialog('Choose a filename to read from','../lala.txt', 0, nil, nil, 0); - writeln (lCReturnedString); - if Length(lCReturnedString) = 0 then exit; - - lCReturnedString := tinyfd_selectFolderDialog('Select a folder','../..'); - writeln (lCReturnedString); - if Length(lCReturnedString) = 0 then exit; - - lCReturnedString := tinyfd_colorChooser('A tinyfd title','', lArrayOfChar, lArrayOfChar); - writeln (lCReturnedString); -end. - -{ -gcc -c ../../tinyfiledialogs.c -fpc tinyfd.pp -fpc hello.pas -} diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/freepascal/tinyfd.pp b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/freepascal/tinyfd.pp deleted file mode 100644 index 7826de0..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/freepascal/tinyfd.pp +++ /dev/null @@ -1,138 +0,0 @@ -{ SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - _________ - / \ tinyfiledialogs v3.14 [Jan 26, 2025] zlib licence - |tiny file| - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - - - License - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - ___________________________________________________________ - | | - | If you like this new PASCAL module please upvote | - | my stackoverflow answer on the PASCAL post | - | https://stackoverflow.com/a/59657117 | - |___________________________________________________________| -} - -unit tinyfd; -interface - -{$linklib c} - -{ Adapted from - Automatically converted by H2Pas 1.0.0 from ../../tinyfiledialogs.h - The following command line parameters were used: - ../../tinyfiledialogs.h - -o - tinyfd.pp -} - - Type - Pchar = ^char; - -{$ifdef _WIN32} - Pwchar_t = ^wchar_t; -{$ENDIF} - - -{$IFDEF FPC} -{$PACKRECORDS C} -{$ENDIF} - -{$ifdef _WIN32} - var - tinyfd_winUtf8 : longint;cvar;external; - - function tinyfd_utf8toMbcs(aUtf8string:Pchar):Pchar;cdecl; - function tinyfd_utf16toMbcs(aUtf16string:Pwchar_t):Pchar;cdecl; - function tinyfd_mbcsTo16(aMbcsString:Pchar):Pwchar_t;cdecl; - function tinyfd_mbcsTo8(aMbcsString:Pchar):Pchar;cdecl; - function tinyfd_utf8to16(aUtf8string:Pchar):Pwchar_t;cdecl; - function tinyfd_utf16to8(aUtf16string:Pwchar_t):Pchar;cdecl; -{$endif} - - function tinyfd_getGlobalChar(aCharVariableName:Pchar):Pchar;cdecl; - function tinyfd_getGlobalInt(aIntVariableName:Pchar):longint;cdecl; - function tinyfd_setGlobalInt(aIntVariableName:Pchar; aValue:longint):longint;cdecl; - - var - tinyfd_version : array[0..7] of char;cvar;external; - tinyfd_needs : Pchar;cvar;external; - tinyfd_verbose : longint;cvar;external; - tinyfd_silent : longint;cvar;external; - tinyfd_allowCursesDialogs : longint;cvar;external; - tinyfd_forceConsole : longint;cvar;external; - {tinyfd_assumeGraphicDisplay : longint;cvar;external;} - tinyfd_response : array[0..1023] of char;cvar;external; - - procedure tinyfd_beep;cdecl; - function tinyfd_notifyPopup(aTitle:Pchar; aMessage:Pchar; aIconType:Pchar):longint;cdecl; - function tinyfd_messageBox(aTitle:Pchar; aMessage:Pchar; aDialogType:Pchar; aIconType:Pchar; aDefaultButton:longint):longint;cdecl; - function tinyfd_inputBox(aTitle:Pchar; aMessage:Pchar; aDefaultInput:Pchar):Pchar;cdecl; - function tinyfd_saveFileDialog(aTitle:Pchar; aDefaultPathAndFile:Pchar; aNumOfFilterPatterns:longint; aFilterPatterns:PPchar; aSingleFilterDescription:Pchar):Pchar;cdecl; - function tinyfd_openFileDialog(aTitle:Pchar; aDefaultPathAndFile:Pchar; aNumOfFilterPatterns:longint; aFilterPatterns:PPchar; aSingleFilterDescription:Pchar;aAllowMultipleSelects:longint):Pchar;cdecl; - function tinyfd_selectFolderDialog(aTitle:Pchar; aDefaultPath:Pchar):Pchar;cdecl; - function tinyfd_colorChooser(aTitle:Pchar; aDefaultHexRGB:Pchar; aDefaultRGB:array of byte; aoResultRGB:array of byte):Pchar;cdecl; - -{$ifdef _WIN32} - function tinyfd_notifyPopupW(aTitle:Pwchar_t; aMessage:Pwchar_t; aIconType:Pwchar_t):longint;cdecl; - function tinyfd_messageBoxW(aTitle:Pwchar_t; aMessage:Pwchar_t; aDialogType:Pwchar_t; aIconType:Pwchar_t; aDefaultButton:longint):longint;cdecl; - function tinyfd_inputBoxW(aTitle:Pwchar_t; aMessage:Pwchar_t; aDefaultInput:Pwchar_t):Pwchar_t;cdecl; - function tinyfd_saveFileDialogW(aTitle:Pwchar_t; aDefaultPathAndFile:Pwchar_t; aNumOfFilterPatterns:longint; aFilterPatterns:PPwchar_t; aSingleFilterDescription:Pwchar_t):Pwchar_t;cdecl; - function tinyfd_openFileDialogW(aTitle:Pwchar_t; aDefaultPathAndFile:Pwchar_t; aNumOfFilterPatterns:longint; aFilterPatterns:PPwchar_t; aSingleFilterDescription:Pwchar_t;aAllowMultipleSelects:longint):Pwchar_t;cdecl; - function tinyfd_selectFolderDialogW(aTitle:Pwchar_t; aDefaultPath:Pwchar_t):Pwchar_t;cdecl; - function tinyfd_colorChooserW(aTitle:Pwchar_t; aDefaultHexRGB:Pwchar_t; aDefaultRGB:array of byte; aoResultRGB:array of byte):Pwchar_t;cdecl; -{$endif} - -implementation - -{$Link 'tinyfiledialogs.o'} - -{$ifdef _WIN32} - function tinyfd_utf8toMbcs(aUtf8string:Pchar):Pchar;cdecl;external; - function tinyfd_utf16toMbcs(aUtf16string:Pwchar_t):Pchar;cdecl;external; - function tinyfd_mbcsTo16(aMbcsString:Pchar):Pwchar_t;cdecl;external; - function tinyfd_mbcsTo8(aMbcsString:Pchar):Pchar;cdecl;external; - function tinyfd_utf8to16(aUtf8string:Pchar):Pwchar_t;cdecl;external; - function tinyfd_utf16to8(aUtf16string:Pwchar_t):Pchar;cdecl;external; -{$endif} - - function tinyfd_getGlobalChar(aCharVariableName:Pchar):Pchar;cdecl;external; - function tinyfd_getGlobalInt(aIntVariableName:Pchar):longint;cdecl;external; - function tinyfd_setGlobalInt(aIntVariableName:Pchar; aValue:longint):longint;cdecl;external; - - procedure tinyfd_beep;cdecl;external; - function tinyfd_notifyPopup(aTitle:Pchar; aMessage:Pchar; aIconType:Pchar):longint;cdecl;external; - function tinyfd_messageBox(aTitle:Pchar; aMessage:Pchar; aDialogType:Pchar; aIconType:Pchar; aDefaultButton:longint):longint;cdecl;external; - function tinyfd_inputBox(aTitle:Pchar; aMessage:Pchar; aDefaultInput:Pchar):Pchar;cdecl;external; - function tinyfd_saveFileDialog(aTitle:Pchar; aDefaultPathAndFile:Pchar; aNumOfFilterPatterns:longint; aFilterPatterns:PPchar; aSingleFilterDescription:Pchar):Pchar;cdecl;external; - function tinyfd_openFileDialog(aTitle:Pchar; aDefaultPathAndFile:Pchar; aNumOfFilterPatterns:longint; aFilterPatterns:PPchar; aSingleFilterDescription:Pchar;aAllowMultipleSelects:longint):Pchar;cdecl;external; - function tinyfd_selectFolderDialog(aTitle:Pchar; aDefaultPath:Pchar):Pchar;cdecl;external; - function tinyfd_colorChooser(aTitle:Pchar; aDefaultHexRGB:Pchar; aDefaultRGB:array of byte; aoResultRGB:array of byte):Pchar;cdecl;external; - -{$ifdef _WIN32} - function tinyfd_notifyPopupW(aTitle:Pwchar_t; aMessage:Pwchar_t; aIconType:Pwchar_t):longint;cdecl;external; - function tinyfd_messageBoxW(aTitle:Pwchar_t; aMessage:Pwchar_t; aDialogType:Pwchar_t; aIconType:Pwchar_t; aDefaultButton:longint):longint;cdecl;external; - function tinyfd_inputBoxW(aTitle:Pwchar_t; aMessage:Pwchar_t; aDefaultInput:Pwchar_t):Pwchar_t;cdecl;external; - function tinyfd_saveFileDialogW(aTitle:Pwchar_t; aDefaultPathAndFile:Pwchar_t; aNumOfFilterPatterns:longint; aFilterPatterns:PPwchar_t; aSingleFilterDescription:Pwchar_t):Pwchar_t;cdecl;external; - function tinyfd_openFileDialogW(aTitle:Pwchar_t; aDefaultPathAndFile:Pwchar_t; aNumOfFilterPatterns:longint; aFilterPatterns:PPwchar_t; aSingleFilterDescription:Pwchar_t;aAllowMultipleSelects:longint):Pwchar_t;cdecl;external; - function tinyfd_selectFolderDialogW(aTitle:Pwchar_t; aDefaultPath:Pwchar_t):Pwchar_t;cdecl;external; - function tinyfd_colorChooserW(aTitle:Pwchar_t; aDefaultHexRGB:Pwchar_t; aDefaultRGB:array of byte; aoResultRGB:array of byte):Pwchar_t;cdecl;external; -{$endif} - -end. diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs.r b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs.r deleted file mode 100644 index b2ae3f3..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs.r +++ /dev/null @@ -1,157 +0,0 @@ -# SPDX-License-Identifier: ZLIB -# Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com -# _________ -# / \ tinyfiledialogs v3.14.0 [Sep 12, 2023] -# |tiny file| -# | dialogs | -# \____ ___/ http://tinyfiledialogs.sourceforge.net -# \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - -# - License - -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. -# ___________________________________________________________ -# | | -# | If you like this new R interface please upvote | -# | my stackoverflow answer on the R post | -# | https://stackoverflow.com/a/77091332 | -# |___________________________________________________________| - - - - -# Load the appropriate tinyfd library - -# Macintosh -dyn.load("tinyfiledialogsAppleSilicon.dylib") -#dyn.load("tinyfiledialogsIntel.dylib") - -# Linux on Intel -#dyn.load("tinyfiledialogsLinux86.so") -#dyn.load("tinyfiledialogsLinux64.so") - -# Windows on Intel -#dyn.load("tinyfiledialogs32.dll") -#dyn.load("tinyfiledialogs64.dll") - - -# R interface to tinyfd C functions - -tinyfd_beep <- function() { - result <- .C("tinyfd_beep") - return(result) -} - - -tinyfd_notifyPopup <- function(aTitle, aMessage, aIconType) -{ - result <- .C("tinyfd_notifyPopup", - charToRaw(aTitle), - charToRaw(aMessage), - charToRaw(aIconType)) - - return(result) -} - - -tinyfd_messageBox <- function(aTitle , aMessage , aDialogType , aIconType , aDefaultButton) -{ - result <- .C("tfd_messageBox", - charToRaw(aTitle), - charToRaw(aMessage), - charToRaw(aDialogType), - charToRaw(aIconType), - lDefaultButton = as.integer(aDefaultButton) ) - - return(result$lDefaultButton) -} - - -tinyfd_inputBox <- function(aTitle , aMessage , aDefaultInput) # "NULL" for a password box -{ - result <- .C("tfd_inputBox", - charToRaw(aTitle), - charToRaw(aMessage), - lTextOutput = aDefaultInput ) - - if ( result$lTextOutput == "NULL" ) return() - else return(result$lTextOutput) -} - - -tinyfd_saveFileDialog <- function(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, - aFilterPatterns, aSingleFilterDescription ) -{ - result <- .C("tfd_saveFileDialog", - charToRaw(aTitle), - lSaveFile = aDefaultPathAndFile , - as.integer(aNumOfFilterPatterns) , - aFilterPatterns , - charToRaw(aSingleFilterDescription) ) - - if ( result$lSaveFile == "NULL" ) return() - else return(result$lSaveFile) -} - - -tinyfd_openFileDialog <- function(aTitle, aDefaultPathAndFile , aNumOfFilterPatterns, - aFilterPatterns, aSingleFilterDescription , aAllowMultipleSelects ) -{ - result <- .C("tfd_openFileDialog", - charToRaw(aTitle), - lOpenFile = aDefaultPathAndFile , - as.integer(aNumOfFilterPatterns) , - aFilterPatterns , - charToRaw(aSingleFilterDescription) , - as.integer(aAllowMultipleSelects) ) - - if ( result$lOpenFile == "NULL" ) return() - else return(result$lOpenFile) -} - - -tinyfd_selectFolderDialog <- function(aTitle, aDefaultPath) -{ - result <- .C("tfd_selectFolderDialog", - charToRaw(aTitle), - lSelectedFolder = aDefaultPath ) - - if ( result$lSelectedFolder == "NULL" ) return() - else return(result$lSelectedFolder) -} - - -tinyfd_colorChooser <- function(aTitle, aDefaultHexRGB) # "#FF0000" -{ - result <- .C("tfd_colorChooser", - charToRaw(aTitle), - lOutputHexRGB = aDefaultHexRGB ) - - if ( result$lOutputHexRGB == "NULL" ) return() - else return(result$lOutputHexRGB) -} - - -# example R calls to tinyfd functions - -tinyfd_beep() -tinyfd_notifyPopup( "a title" , "a message", "warning" ) -tinyfd_messageBox( "a title" , "a message" , "yesno" , "info" , 1 ) -tinyfd_inputBox( "a title" , "a message" , "NULL" ) # "NULL" for a password box -tinyfd_saveFileDialog( "a title" , "/Users/bardos/Documents/test.txt" , 0 , "" , "") -tinyfd_saveFileDialog( "a title" , "/Users/bardos/Documents/test.txt" , 1 , c ("*.txt","*.jpg") , "some files") -lFilename <- tinyfd_openFileDialog( "a title" , "/Users/bardos/Documents/" , 1 , c ("*.txt","*.jpg") , "some files" , 0 ) -lFilename -tinyfd_selectFolderDialog( "a title" , "/Users/bardos/Devs" ) -tinyfd_colorChooser( "a title" , "#FF0000" ) diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs32.dll b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs32.dll Binary files differdeleted file mode 100644 index 91f7019..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs32.dll +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs32.lib b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs32.lib Binary files differdeleted file mode 100644 index ea8a5ca..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs32.lib +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs64.dll b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs64.dll Binary files differdeleted file mode 100644 index 8aa3991..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs64.dll +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs64.lib b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs64.lib Binary files differdeleted file mode 100644 index 3d74b2e..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs64.lib +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsAppleSilicon.dylib b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsAppleSilicon.dylib Binary files differdeleted file mode 100644 index e76c77d..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsAppleSilicon.dylib +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsIntel.dylib b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsIntel.dylib Binary files differdeleted file mode 100644 index 40a51c8..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsIntel.dylib +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsLinux64.so b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsLinux64.so Binary files differdeleted file mode 100644 index f54319e..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsLinux64.so +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsLinux86.so b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsLinux86.so Binary files differdeleted file mode 100644 index 099f4d7..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsLinux86.so +++ /dev/null diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsTest.cs b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsTest.cs deleted file mode 100644 index eaa293a..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogsTest.cs +++ /dev/null @@ -1,153 +0,0 @@ -©À/* SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - _________ - / \ tinyfiledialogsTest.cs v3.15.1 [Nov 19, 2023] zlib licence - |tiny file| C# bindings created [2015] - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - ____________________________________________ - | | - | email: tinyfiledialogs at ysengrin.com | - |____________________________________________| - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - -- License - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Runtime.InteropServices; - -class tinyfd -{ - public const string mDllLocation = "C:\\Users\\frogs\\yomspace2015\\yomlibs\\tinyfd\\dll_cs_lua_fortran_pascal\\tinyfiledialogs32.dll"; - - // cross platform UTF8 - [DllImport(mDllLocation, CallingConvention = CallingConvention.Cdecl)] - public static extern void tinyfd_beep(); - - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern int tinyfd_notifyPopup(string aTitle, string aMessage, string aIconType); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern int tinyfd_messageBox(string aTitle, string aMessage, string aDialogType, string aIconType, int aDefaultButton); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_inputBox(string aTitle, string aMessage, string aDefaultInput); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_saveFileDialog(string aTitle, string aDefaultPathAndFile, int aNumOfFilterPatterns, string[] aFilterPatterns, string aSingleFilterDescription); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_openFileDialog(string aTitle, string aDefaultPathAndFile, int aNumOfFilterPatterns, string[] aFilterPatterns, string aSingleFilterDescription, int aAllowMultipleSelects); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_selectFolderDialog(string aTitle, string aDefaultPathAndFile); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_colorChooser(string aTitle, string aDefaultHexRGB, byte[] aDefaultRGB, byte[] aoResultRGB); - - // windows only utf16 - [DllImport(mDllLocation, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern int tinyfd_notifyPopupW(string aTitle, string aMessage, string aIconType); - [DllImport(mDllLocation, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern int tinyfd_messageBoxW(string aTitle, string aMessage, string aDialogType, string aIconType, int aDefaultButton); - [DllImport(mDllLocation, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_inputBoxW(string aTitle, string aMessage, string aDefaultInput); - [DllImport(mDllLocation, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_saveFileDialogW(string aTitle, string aDefaultPathAndFile, int aNumOfFilterPatterns, string[] aFilterPatterns, string aSingleFilterDescription); - [DllImport(mDllLocation, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_openFileDialogW(string aTitle, string aDefaultPathAndFile, int aNumOfFilterPatterns, string[] aFilterPatterns, string aSingleFilterDescription, int aAllowMultipleSelects); - [DllImport(mDllLocation, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_selectFolderDialogW(string aTitle, string aDefaultPathAndFile); - [DllImport(mDllLocation, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_colorChooserW(string aTitle, string aDefaultHexRGB, byte[] aDefaultRGB, byte[] aoResultRGB); - - // cross platform - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr tinyfd_getGlobalChar(string aCharVariableName); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern int tinyfd_getGlobalInt(string aIntVariableName); - [DllImport(mDllLocation, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] - public static extern int tinyfd_setGlobalInt(string aIntVariableName, int aValue); - - // ******** a complicated way to access tinyfd's global variables - // [DllImport("kernel32.dll", SetLastError = true)] internal static extern IntPtr GetProcAddress(IntPtr hModule, string procName); - // [DllImport("kernel32.dll", SetLastError = true)] internal static extern IntPtr LoadLibrary(string lpszLib); -} - -namespace ConsoleApplication1 -{ - class tinyfiledialogsTest - { - private static string stringFromAnsi(IntPtr ptr) // for UTF-8/char - { - return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(ptr); - } - - private static string stringFromUni(IntPtr ptr) // for UTF-16/wchar_t - { - return System.Runtime.InteropServices.Marshal.PtrToStringUni(ptr); - } - - [STAThread] - static void Main(string[] args) - { - // ******** a simple way to access tinyfd's global variables - IntPtr lTheVersionText = tinyfd.tinyfd_getGlobalChar("tinyfd_version"); - string lTheVersionString = stringFromAnsi(lTheVersionText); - tinyfd.tinyfd_messageBox("tinyfd_version", lTheVersionString, "ok", "info", 1); - - // cross platform utf-8 - IntPtr lTheInputText = tinyfd.tinyfd_inputBox("input box", "gimme a string", "A text to input"); - string lTheInputString = stringFromAnsi(lTheInputText); - int lala = tinyfd.tinyfd_messageBox("a message box char", lTheInputString, "ok", "warning", 1); - - lTheInputText = tinyfd.tinyfd_selectFolderDialog("select a folder", ""); - lTheInputString = stringFromAnsi(lTheInputText); - lala = tinyfd.tinyfd_messageBox("the chosen folder", lTheInputString, "ok", "warning", 1); - - // windows only utf-16 - IntPtr lAnotherInputTextW = tinyfd.tinyfd_inputBoxW("input box", "gimme another string", "Another text to input"); - string lAnotherInputString = stringFromUni(lAnotherInputTextW); - int lili = tinyfd.tinyfd_messageBoxW("a message box wchar_t", lAnotherInputString, "ok", "info", 1); - - lAnotherInputTextW = tinyfd.tinyfd_selectFolderDialogW("select a folderW", ""); - lAnotherInputString = stringFromUni(lAnotherInputTextW); - lili = tinyfd.tinyfd_messageBoxW("a message box wchar_t", lAnotherInputString, "ok", "info", 1); - - tinyfd.tinyfd_notifyPopupW("just a dummy warning", lTheVersionString, "warning"); - - // cross platform - tinyfd.tinyfd_beep(); - - // ******** a complicated way to access tinyfd's global variables (uncomment the last 2 lines in the class tinyfd above) - // IntPtr tinyfd_DLL = tinyfd.LoadLibrary(tinyfd.mDllLocation); - // if (tinyfd_DLL != IntPtr.Zero) - // { - // IntPtr lVersionAddr = tinyfd.GetProcAddress(tinyfd_DLL, "tinyfd_version"); - // string lVersion = stringFromAnsi(lVersionAddr); - // IntPtr lForceConsoleAddr = tinyfd.GetProcAddress(tinyfd_DLL, "tinyfd_forceConsole"); - // if (lForceConsoleAddr != IntPtr.Zero) - // { - // int lForceConsoleValue = Marshal.ReadInt32(lForceConsoleAddr); - // tinyfd.tinyfd_notifyPopup(lVersion, lForceConsoleValue.ToString(), "info"); - // Marshal.WriteInt32(lForceConsoleAddr, 0); - // } - // } - } - } -} diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-32.bat b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-32.bat deleted file mode 100644 index efea209..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-32.bat +++ /dev/null @@ -1,29 +0,0 @@ - -:: cd C:\Users\frogs\yomspace2015\yomlibs\tinyfd\dll_cs_lua_fortran_pascal - -\MinGW32-49\bin\gcc -ansi -std=gnu89 -pedantic -Wstrict-prototypes -Wall -c ../tinyfiledialogs.c -\MinGW32-49\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\MinGW32-49\bin\gcc -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -LC:/MinGW/lib -lcomdlg32 -lole32 -\MinGW32-49\bin\gcc -ansi -std=gnu89 -pedantic -Wstrict-prototypes -Wall -o hello32.exe ../hello.c tinyfiledialogs32.lib -\MinGW32-49\bin\gcc -ansi -std=gnu89 -pedantic -Wstrict-prototypes -Wall -o helloW32.exe ../hello_wchar_t.c tinyfiledialogs32.lib - -\MinGW32-49\bin\gcc -pedantic -Wstrict-prototypes -Wall -c ../tinyfiledialogs.c -\MinGW32-49\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\MinGW32-49\bin\gcc -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -LC:/MinGW/lib -lcomdlg32 -lole32 -\MinGW32-49\bin\gcc -pedantic -Wstrict-prototypes -Wall -o hello32.exe ../hello.c tinyfiledialogs32.lib -\MinGW32-49\bin\gcc -pedantic -Wstrict-prototypes -Wall -o helloW32.exe ../hello_wchar_t.c tinyfiledialogs32.lib - - -\MinGW32-63\bin\gcc -ansi -std=gnu89 -pedantic -Wstrict-prototypes -Wall -c ../tinyfiledialogs.c -\MinGW32-63\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\MinGW32-63\bin\gcc -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -LC:/MinGW63/lib -lcomdlg32 -lole32 -\MinGW32-63\bin\gcc -ansi -std=gnu89 -pedantic -Wstrict-prototypes -Wall -o hello32.exe ../hello.c tinyfiledialogs32.lib -\MinGW32-63\bin\gcc -ansi -std=gnu89 -pedantic -Wstrict-prototypes -Wall -o helloW32.exe ../hello_wchar_t.c tinyfiledialogs32.lib - -\MinGW32-63\bin\gcc -pedantic -Wstrict-prototypes -Wall -c ../tinyfiledialogs.c -\MinGW32-63\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\MinGW32-63\bin\gcc -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -LC:/MinGW63/lib -lcomdlg32 -lole32 -\MinGW32-63\bin\gcc -pedantic -Wstrict-prototypes -Wall -o hello32.exe ../hello.c tinyfiledialogs32.lib -\MinGW32-63\bin\gcc -pedantic -Wstrict-prototypes -Wall -o helloW32.exe ../hello_wchar_t.c tinyfiledialogs32.lib - -@REM -std=gnu89 -Ofast -std=c++11 diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-w64-720.bat b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-w64-720.bat deleted file mode 100644 index e37e000..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-w64-720.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: cd C:\Users\frogs\yomspace2015\yomlibs\tinyfd\dll_cs_lua_fortran_pascal - -:: x86 -\mingw-w64-720\mingw32\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m32 -Wall -c ../tinyfiledialogs.c -\mingw-w64-720\mingw32\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\mingw-w64-720\mingw32\bin\gcc -m32 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -L\mingw-w64-720\mingw32\lib -lcomdlg32 -lole32 -\mingw-w64-720\mingw32\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m32 -Wall -o hello32.exe ../hello.c tinyfiledialogs32.lib -\mingw-w64-720\mingw32\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m32 -Wall -o helloW32.exe ../hello_wchar_t.c tinyfiledialogs32.lib - -\mingw-w64-720\mingw32\bin\gcc -pedantic -Wstrict-prototypes -m32 -Wall -c ../tinyfiledialogs.c -\mingw-w64-720\mingw32\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\mingw-w64-720\mingw32\bin\gcc -m32 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -L\mingw-w64-720\mingw32\lib -lcomdlg32 -lole32 -\mingw-w64-720\mingw32\bin\gcc -pedantic -Wstrict-prototypes -m32 -Wall -o hello32.exe ../hello.c tinyfiledialogs32.lib -\mingw-w64-720\mingw32\bin\gcc -pedantic -Wstrict-prototypes -m32 -Wall -o helloW32.exe ../hello_wchar_t.c tinyfiledialogs32.lib - -:: x64 -\mingw-w64-720\mingw64\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m64 -Wall -c ../tinyfiledialogs.c -\mingw-w64-720\mingw64\bin\dlltool --export-all-symbols -l tinyfiledialogs64.lib tinyfiledialogs.o --dllname tinyfiledialogs64.dll -\mingw-w64-720\mingw64\bin\gcc -m64 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs64.dll -L\mingw-w64-720\mingw64\lib -lcomdlg32 -lole32 -\mingw-w64-720\mingw64\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m64 -Wall -o hello64.exe ../hello.c tinyfiledialogs64.lib -\mingw-w64-720\mingw64\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m64 -Wall -o helloW64.exe ../hello_wchar_t.c tinyfiledialogs64.lib - -\mingw-w64-720\mingw64\bin\gcc -pedantic -Wstrict-prototypes -m64 -Wall -c ../tinyfiledialogs.c -\mingw-w64-720\mingw64\bin\dlltool --export-all-symbols -l tinyfiledialogs64.lib tinyfiledialogs.o --dllname tinyfiledialogs64.dll -\mingw-w64-720\mingw64\bin\gcc -m64 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs64.dll -L\mingw-w64-720\mingw64\lib -lcomdlg32 -lole32 -\mingw-w64-720\mingw64\bin\gcc -pedantic -Wstrict-prototypes -m64 -Wall -o hello64.exe ../hello.c tinyfiledialogs64.lib -\mingw-w64-720\mingw64\bin\gcc -pedantic -Wstrict-prototypes -m64 -Wall -o helloW64.exe ../hello_wchar_t.c tinyfiledialogs64.lib - -@REM \mingw-w64\mingw64\bin\gcc -std=c89 -o hello.exe tinyfiledialogs.c hello.c -LC:\mingw-w64\mingw64\lib -lcomdlg32 -lole32 diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-w64-810.bat b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-w64-810.bat deleted file mode 100644 index a5e7ae7..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dll_mingw-w64-810.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: cd C:\Users\frogs\yomspace2015\yomlibs\tinyfd\dll_cs_lua_R_fortran_pascal - -:: x86 -\mingw-w64-13.2.0\mingw32\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m32 -Wall -c ..\tinyfiledialogs.c -\mingw-w64-13.2.0\mingw32\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\mingw-w64-13.2.0\mingw32\bin\gcc -m32 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -L\mingw-w64-13.2.0\mingw32\lib -lcomdlg32 -lole32 -\mingw-w64-13.2.0\mingw32\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m32 -Wall -o hello32.exe ..\hello.c tinyfiledialogs32.lib -\mingw-w64-13.2.0\mingw32\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m32 -Wall -o helloW32.exe ..\hello_wchar_t.c tinyfiledialogs32.lib - -\mingw-w64-13.2.0\mingw32\bin\gcc -pedantic -Wstrict-prototypes -m32 -Wall -c ..\tinyfiledialogs.c -\mingw-w64-13.2.0\mingw32\bin\dlltool --export-all-symbols -l tinyfiledialogs32.lib tinyfiledialogs.o --dllname tinyfiledialogs32.dll -\mingw-w64-13.2.0\mingw32\bin\gcc -m32 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs32.dll -L\mingw-w64-13.2.0\mingw32\lib -lcomdlg32 -lole32 -\mingw-w64-13.2.0\mingw32\bin\gcc -pedantic -Wstrict-prototypes -m32 -Wall -o hello32.exe ..\hello.c tinyfiledialogs32.lib -\mingw-w64-13.2.0\mingw32\bin\gcc -pedantic -Wstrict-prototypes -m32 -Wall -o helloW32.exe ..\hello_wchar_t.c tinyfiledialogs32.lib - -:: x64 -\mingw-w64-13.2.0\mingw64\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m64 -Wall -c ..\tinyfiledialogs.c -\mingw-w64-13.2.0\mingw64\bin\dlltool --export-all-symbols -l tinyfiledialogs64.lib tinyfiledialogs.o --dllname tinyfiledialogs64.dll -\mingw-w64-13.2.0\mingw64\bin\gcc -m64 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs64.dll -L\mingw-w64-13.2.0\mingw64\lib -lcomdlg32 -lole32 -\mingw-w64-13.2.0\mingw64\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m64 -Wall -o hello64.exe ..\hello.c tinyfiledialogs64.lib -\mingw-w64-13.2.0\mingw64\bin\gcc -ansi -std=c89 -pedantic -Wstrict-prototypes -m64 -Wall -o helloW64.exe ..\hello_wchar_t.c tinyfiledialogs64.lib - -\mingw-w64-13.2.0\mingw64\bin\gcc -pedantic -Wstrict-prototypes -m64 -Wall -c ..\tinyfiledialogs.c -\mingw-w64-13.2.0\mingw64\bin\dlltool --export-all-symbols -l tinyfiledialogs64.lib tinyfiledialogs.o --dllname tinyfiledialogs64.dll -\mingw-w64-13.2.0\mingw64\bin\gcc -m64 -shared -static-libgcc tinyfiledialogs.o -o tinyfiledialogs64.dll -L\mingw-w64-13.2.0\mingw64\lib -lcomdlg32 -lole32 -\mingw-w64-13.2.0\mingw64\bin\gcc -pedantic -Wstrict-prototypes -m64 -Wall -o hello64.exe ..\hello.c tinyfiledialogs64.lib -\mingw-w64-13.2.0\mingw64\bin\gcc -pedantic -Wstrict-prototypes -m64 -Wall -o helloW64.exe ..\hello_wchar_t.c tinyfiledialogs64.lib - -@REM \mingw-w64\mingw64\bin\gcc -std=c89 -o hello.exe tinyfiledialogs.c hello.c -LC:\mingw-w64\mingw64\lib -lcomdlg32 -lole32 diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dylib.sh b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dylib.sh deleted file mode 100644 index dd7d81b..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_dylib.sh +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/sh - -# clang -c ../tinyfiledialogs.c -# clang -dynamiclib tinyfiledialogs.o -o tinyfiledialogsIntel.dylib -# clang -o hello.app ../hello.c ./tinyfiledialogsIntel.dylib - -clang -c ../tinyfiledialogs.c - -if [ `uname -s` = "Darwin" ]; then - echo Darwin - if [ `uname -m` = "x86_64" ]; then - echo x86_64 - clang -dynamiclib tinyfiledialogs.o -o tinyfiledialogsIntel.dylib - elif [ `uname -m` = "arm64" ]; then - echo arm64 - clang -dynamiclib tinyfiledialogs.o -o tinyfiledialogsAppleSilicon.dylib - fi -fi diff --git a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_so.sh b/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_so.sh deleted file mode 100644 index 2a40f9b..0000000 --- a/libs/tinyfiledialogs/dll_cs_lua_R_fortran_pascal/tinyfiledialogs_so.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh - -if [ `uname -s` = "Linux" ]; then - echo Linux 32 - gcc -m32 -fPIC -shared -o tinyfiledialogsLinux86.so ../tinyfiledialogs.c - gcc -m32 -o hello ../hello.c ./tinyfiledialogsLinux86.so - - echo Linux 64 - gcc -m64 -fPIC -shared -o tinyfiledialogsLinux64.so ../tinyfiledialogs.c - gcc -m64 -o hello ../hello.c ./tinyfiledialogsLinux64.so -elif [ `uname -s` = "OpenBSD" ]; then - echo OpenBSD - clang -m32 -fPIC -shared -o tinyfiledialogsOpenBSDx86.so ../tinyfiledialogs.c - clang -m32 -o hello ../hello.c ./tinyfiledialogsOpenBSDx86.so - - clang -m64 -fPIC -shared -o tinyfiledialogsOpenBSDx64.so ../tinyfiledialogs.c - clang -m64 -o hello ../hello.c ./tinyfiledialogsOpenBSDx64.so -else - echo Other Unix -fi diff --git a/libs/tinyfiledialogs/hello.c b/libs/tinyfiledialogs/hello.c deleted file mode 100644 index 64476d3..0000000 --- a/libs/tinyfiledialogs/hello.c +++ /dev/null @@ -1,307 +0,0 @@ -/* SPDX-License-Identifier: Zlib -Copyright (c) 2014 - 2024 Guillaume Vareille http://ysengrin.com - ________________________________________________________________ - | | - | 100% compatible C C++ -> You can rename this .c file as .cpp | - |________________________________________________________________| - -********* TINY FILE DIALOGS OFFICIAL WEBSITE IS ON SOURCEFORGE ********* - _________ - / \ hello.c v3.19.3 [Jul 28, 2025] - |tiny file| Hello World file created [November 9, 2014] - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - ____________________________________________ - | | - | email: tinyfiledialogs at ysengrin.com | - |____________________________________________| - _________________________________________________________________________________ - | | - | the windows only wchar_t UTF-16 prototypes are at the bottom of the header file | - |_________________________________________________________________________________| - _________________________________________________________ - | | - | on windows: - since v3.6 char is UTF-8 by default | - | - if you want MBCS set tinyfd_winUtf8 to 0 | - | - functions like fopen expect MBCS | - |_________________________________________________________| - ___________________________________________________________ - | | - | v3.10: NEW FORTRAN module fully implemented with examples | - | https://stackoverflow.com/a/59657117 | - |___________________________________________________________| - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - -- License - - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -/* -- Here is the Hello World: - if a console is missing, it will use graphic dialogs - if a graphical display is absent, it will use console dialogs - (on windows the input box may take some time to open the first time) - - See compilation instructions at the end of this file - - __________________________________________ - | ______________________________________ | - | | | | - | | DO NOT USE USER INPUT IN THE DIALOGS | | - | |______________________________________| | - |__________________________________________| -*/ - -#include <stdio.h> -#include <string.h> -#include "tinyfiledialogs.h" - -#ifdef _MSC_VER -#pragma warning(disable:4996) /* silences warnings about strcpy strcat fopen*/ -#endif - -int main( int argc , char * argv[] ) -{ - int lIntValue; - char * lPassword; - char * lTheSaveFileName; - char * lTheOpenFileName; - char * lTheSelectFolderName; - char * lTheHexColor; - char * lWillBeGraphicMode; - unsigned char lRgbColor[3]; - FILE * lIn; - char lBuffer[1024]; - char const * lFilterPatterns[2] = { "*.txt", "*.text" }; - - (void)argv; /*to silence stupid visual studio warning*/ - - tinyfd_verbose = argc - 1; /* default is 0 */ - tinyfd_silent = 1; /* default is 1 */ - - tinyfd_forceConsole = 0; /* default is 0 */ - /* tinyfd_assumeGraphicDisplay = 0; */ /* default is 0 */ - -#ifdef _WIN32 - tinyfd_winUtf8 = 1; /* default is 1 */ -/* On windows, you decide if char holds 1:UTF-8(default) or 0:MBCS */ -/* Windows is not ready to handle UTF-8 as many char functions like fopen() expect MBCS filenames.*/ -/* This hello.c file has been prepared, on windows, to convert the filenames from UTF-8 to UTF-16 - and pass them passed to _wfopen() instead of fopen() */ -#endif - - tinyfd_beep(); - - lWillBeGraphicMode = tinyfd_inputBox("tinyfd_query", NULL, NULL); - - strcpy(lBuffer, "tinyfiledialogs\nv"); - strcat(lBuffer, tinyfd_version); - if (lWillBeGraphicMode) - { - strcat(lBuffer, "\ngraphic mode: "); - } - else - { - strcat(lBuffer, "\nconsole mode: "); - } - strcat(lBuffer, tinyfd_response); - tinyfd_messageBox("hello", lBuffer, "ok", "info", 0); - - tinyfd_notifyPopup("the title", "the message\n\tfrom outer-space", "info"); - - if ( lWillBeGraphicMode && ! tinyfd_forceConsole ) - { -#if 0 - lIntValue = tinyfd_messageBox("Hello World", "\ -graphic dialogs [Yes]\n\ -console mode [No]\n\ -quit [Cancel]", - "yesnocancel", "question", 1); - if (!lIntValue) return 1; - tinyfd_forceConsole = (lIntValue == 2); -#else - lIntValue = tinyfd_messageBox( - "Hello World", "graphic dialogs [Yes] / console mode [No]", - "yesno", "question", 1); - tinyfd_forceConsole = ! lIntValue; -#endif - } - - lPassword = tinyfd_inputBox( - "a password box", "your password will be revealed later", NULL); - - if (!lPassword) return 1; - - tinyfd_messageBox("your password as read", lPassword, "ok", "info", 1); - - lTheSaveFileName = tinyfd_saveFileDialog( - "let us save this password", - "./passwordFile.txt", - 2, - lFilterPatterns, - NULL); - - if (! lTheSaveFileName) - { - tinyfd_messageBox( - "Error", - "Save file name is NULL", - "ok", - "error", - 1); - return 1 ; - } - -#ifdef _WIN32 - if (tinyfd_winUtf8) - lIn = _wfopen(tinyfd_utf8to16(lTheSaveFileName), L"w"); /* the UTF-8 filename is converted to UTF-16 to open the file*/ - else -#endif - lIn = fopen(lTheSaveFileName, "w"); - - if (!lIn) - { - tinyfd_messageBox( - "Error", - "Can not open this file in write mode", - "ok", - "error", - 1); - return 1 ; - } - fputs(lPassword, lIn); - fclose(lIn); - - lTheOpenFileName = tinyfd_openFileDialog( - "let us read the password back", - "../", - 2, - lFilterPatterns, - "text files", - 1); - - if (! lTheOpenFileName) - { - tinyfd_messageBox( - "Error", - "Open file name is NULL", - "ok", - "error", - 0); - return 1 ; - } - -#ifdef _WIN32 - if (tinyfd_winUtf8) - lIn = _wfopen(tinyfd_utf8to16(lTheOpenFileName), L"r"); /* the UTF-8 filename is converted to UTF-16 */ - else -#endif - lIn = fopen(lTheOpenFileName, "r"); - - if (!lIn) - { - tinyfd_messageBox( - "Error", - "Can not open this file in read mode", - "ok", - "error", - 1); - return(1); - } - - lBuffer[0] = '\0'; - fgets(lBuffer, sizeof(lBuffer), lIn); - fclose(lIn); - - tinyfd_messageBox("your password as it was saved", lBuffer, "ok", "info", 1); - - lTheSelectFolderName = tinyfd_selectFolderDialog( - "let us just select a directory", "../../"); - - if (!lTheSelectFolderName) - { - tinyfd_messageBox( - "Error", - "Select folder name is NULL", - "ok", - "error", - 1); - return 1; - } - - tinyfd_messageBox("The selected folder is", lTheSelectFolderName, "ok", "info", 1); - - lTheHexColor = tinyfd_colorChooser( - "choose a nice color", - "#FF0077", - lRgbColor, - lRgbColor); - - if (!lTheHexColor) - { - tinyfd_messageBox( - "Error", - "hexcolor is NULL", - "ok", - "error", - 1); - return 1; - } - - tinyfd_messageBox("The selected hexcolor is", lTheHexColor, "ok", "info", 1); - - tinyfd_messageBox("your read password was", lPassword, "ok", "info", 1); - - return 0; -} - -#ifdef _MSC_VER -#pragma warning(default:4996) -#endif - -/* -OSX : -$ clang -o hello.app hello.c tinyfiledialogs.c -( or gcc ) - -UNIX : -$ gcc -o hello hello.c tinyfiledialogs.c -( or clang tcc owcc cc CC ) - -Windows : - MinGW needs gcc >= v4.9 otherwise some headers are incomplete - > gcc -o hello.exe hello.c tinyfiledialogs.c -LC:/mingw/lib -lcomdlg32 -lole32 - - TinyCC needs >= v0.9.27 (+ tweaks - contact me) otherwise some headers are missing - > tcc -o hello.exe hello.c tinyfiledialogs.c ^ - -isystem C:\tcc\winapi-full-for-0.9.27\include\winapi ^ - -lcomdlg32 -lole32 -luser32 -lshell32 - - Borland C: > bcc32c -o hello.exe hello.c tinyfiledialogs.c - OpenWatcom v2: create a character-mode executable project. - - VisualStudio : - Create a console application project, - it links against comdlg32.lib & ole32.lib. - - VisualStudio command line : - > cl hello.c tinyfiledialogs.c comdlg32.lib ole32.lib user32.lib shell32.lib /W4 -*/ diff --git a/libs/tinyfiledialogs/hello_wchar_t.c b/libs/tinyfiledialogs/hello_wchar_t.c deleted file mode 100644 index 664ee7e..0000000 --- a/libs/tinyfiledialogs/hello_wchar_t.c +++ /dev/null @@ -1,241 +0,0 @@ -/* SPDX-License-Identifier: Zlib -Copyright (c) 2014 - 2024 Guillaume Vareille http://ysengrin.com - ________________________________________________________________ - | | - | 100% compatible C C++ -> You can rename this .c file as .cpp | - |________________________________________________________________| - -********* TINY FILE DIALOGS OFFICIAL WEBSITE IS ON SOURCEFORGE ********* - _________ - / \ hello_wchar_t.c v3.19.3 [Jul 28, 2025] - |tiny file| Hello WCHAR_T windows only file created [November 9, 2014] - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - ____________________________________________ - | | - | email: tinyfiledialogs at ysengrin.com | - |____________________________________________| - ________________________________________________________________ - | | - | this file is for windows only it uses wchar_t UTF-16 functions | - |________________________________________________________________| - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - -- License - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - - See compilation instructions at the end of this file - - __________________________________________ - | ______________________________________ | - | | | | - | | DO NOT USE USER INPUT IN THE DIALOGS | | - | |______________________________________| | - |__________________________________________| -*/ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "tinyfiledialogs.h" - -#ifdef _MSC_VER -#pragma warning(disable:4996) /* silences warning about wcscpy*/ -#endif - -int main(void) /* WINDOWS ONLY */ -{ - wchar_t * lPassword; - wchar_t * lTheSaveFileName; - wchar_t * lTheOpenFileName; - wchar_t * lTheSelectFolderName; - wchar_t * lTheHexColor; - wchar_t * lWillBeGraphicMode; - unsigned char lRgbColor[3]; - FILE * lIn; - wchar_t lWcharBuff[1024]; - wchar_t lBuffer[1024]; - wchar_t const * lFilterPatterns[2] = { L"*.txt", L"*.text" }; - - tinyfd_beep(); - - lWillBeGraphicMode = tinyfd_inputBoxW(L"tinyfd_query", NULL, NULL); - - wcscpy(lBuffer, L"v"); - mbstowcs(lWcharBuff, tinyfd_version, strlen(tinyfd_version) + 1); - wcscat(lBuffer, lWcharBuff); - if (lWillBeGraphicMode) - { - wcscat(lBuffer, L"\ngraphic mode: "); - } - else - { - wcscat(lBuffer, L"\nconsole mode: "); - } - mbstowcs(lWcharBuff, tinyfd_response, strlen(tinyfd_response)+1); - wcscat(lBuffer, lWcharBuff); - wcscat(lBuffer, L"\n"); - mbstowcs(lWcharBuff, tinyfd_needs + 78, strlen(tinyfd_needs + 78) + 1); - wcscat(lBuffer, lWcharBuff); - - tinyfd_messageBoxW(L"hello", lBuffer, L"ok", L"info", 0); - - tinyfd_notifyPopupW(L"the title", L"the message\n\tfrom outer-space", L"info"); - - lPassword = tinyfd_inputBoxW( - L"a password box", L"your password will be revealed later", NULL); - - if (!lPassword) return 1; - - lTheSaveFileName = tinyfd_saveFileDialogW( - L"let us save this password", - L"passwordFile.txt", - 2, - lFilterPatterns, - NULL); - - if (! lTheSaveFileName) - { - tinyfd_messageBoxW( - L"Error", - L"Save file name is NULL", - L"ok", - L"error", - 1); - return 1 ; - } - - lIn = _wfopen(lTheSaveFileName, L"wt, ccs=UNICODE"); - if (!lIn) - { - tinyfd_messageBoxW( - L"Error", - L"Can not open this file in write mode", - L"ok", - L"error", - 1); - return 1 ; - } - fputws(lPassword, lIn); - fclose(lIn); - - lTheOpenFileName = tinyfd_openFileDialogW( - L"let us read the password back", - L"", - 2, - lFilterPatterns, - NULL, - 0); - - if (! lTheOpenFileName) - { - tinyfd_messageBoxW( - L"Error", - L"Open file name is NULL", - L"ok", - L"error", - 1); - return 1 ; - } - - lIn = _wfopen(lTheOpenFileName, L"rt, ccs=UNICODE"); - - if (!lIn) - { - tinyfd_messageBoxW( - L"Error", - L"Can not open this file in read mode", - L"ok", - L"error", - 1); - return(1); - } - lBuffer[0] = '\0'; - fgetws(lBuffer, sizeof(lBuffer), lIn); - fclose(lIn); - - tinyfd_messageBoxW(L"your password is", - lBuffer, L"ok", L"info", 1); - - lTheSelectFolderName = tinyfd_selectFolderDialogW( - L"let us just select a directory", L"C:\\"); - - if (!lTheSelectFolderName) - { - tinyfd_messageBoxW( - L"Error", - L"Select folder name is NULL", - L"ok", - L"error", - 1); - return 1; - } - - tinyfd_messageBoxW(L"The selected folder is", - lTheSelectFolderName, L"ok", L"info", 1); - - lTheHexColor = tinyfd_colorChooserW( - L"choose a nice color", - L"#FF0077", - lRgbColor, - lRgbColor); - - if (!lTheHexColor) - { - tinyfd_messageBoxW( - L"Error", - L"hexcolor is NULL", - L"ok", - L"error", - 1); - return 1; - } - - tinyfd_messageBoxW(L"The selected hexcolor is", - lTheHexColor, L"ok", L"info", 1); - - tinyfd_messageBoxW(L"your password was", lPassword, L"ok", L"info", 1); - - return 0; -} - -#ifdef _MSC_VER -#pragma warning(default:4996) -#endif - - -/* -MinGW needs gcc >= v4.9 otherwise some headers are incomplete -> gcc -o hello.exe hello.c tinyfiledialogs.c -LC:/mingw/lib -lcomdlg32 -lole32 - -TinyCC needs >= v0.9.27 (+ tweaks - contact me) otherwise some headers are missing -> tcc -o hello.exe hello.c tinyfiledialogs.c ^ - -isystem C:\tcc\winapi-full-for-0.9.27\include\winapi ^ - -lcomdlg32 -lole32 -luser32 -lshell32 - -Borland C: > bcc32c -o hello.exe hello.c tinyfiledialogs.c -OpenWatcom v2: create a character-mode executable project. - -VisualStudio : - Create a console application project, - it links against comdlg32.lib & ole32.lib. - -VisualStudio command line : - > cl hello.c tinyfiledialogs.c comdlg32.lib ole32.lib user32.lib shell32.lib /W4 -*/ diff --git a/libs/tinyfiledialogs/more_dialogs/tinyfd_moredialogs.c b/libs/tinyfiledialogs/more_dialogs/tinyfd_moredialogs.c deleted file mode 100644 index bc2960f..0000000 --- a/libs/tinyfiledialogs/more_dialogs/tinyfd_moredialogs.c +++ /dev/null @@ -1,259 +0,0 @@ -/* SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - _________ - / \ tinyfiledialogs v3.9.0 [Nov 3, 2022] zlib licence - |tiny file| - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - -- License - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef __sun -#ifndef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 2 /* to accept POSIX 2 in old ANSI C standards */ -#endif -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "../tinyfiledialogs.h" - -#define MAX_PATH_OR_CMD 1024 /* _MAX_PATH or MAX_PATH */ -int tfd_quoteDetected(char const * aString); -void tfd_replaceSubStr( char const * aSource ,char const * aOldSubStr , - char const * aNewSubStr ,char * aoDestination ); -#ifndef _WIN32 -int tfd_isDarwin(void); -int tfd_kdialogPresent(void); -int tfd_matedialogPresent(void); -int tfd_qarmaPresent(void); -int tfd_shellementaryPresent(void); -int tfd_xpropPresent(void); -int tfd_zenityPresent(void); -int tfd_zenity3Present(void); -#endif /*_WIN32 */ - - -/* not cross platform - unix zenity only */ -/* contributed by Attila Dusnoki */ -#ifndef _WIN32 -char * tinyfd_arrayDialog( - char const * aTitle , /* "" */ - int aNumOfColumns , /* 2 */ - char const * const * aColumns , /* {"Column 1","Column 2"} */ - int aNumOfRows , /* 2 */ - char const * const * aCells ) - /* {"Row1 Col1","Row1 Col2","Row2 Col1","Row2 Col2"} */ -{ - static char lBuff [MAX_PATH_OR_CMD] ; - char lDialogString [MAX_PATH_OR_CMD] ; - FILE * lIn ; - int i ; - - if (tfd_quoteDetected(aTitle)) return tinyfd_arrayDialog("INVALID TITLE WITH QUOTES", aNumOfColumns, aColumns, aNumOfRows, aCells); - for (i = 0; i < aNumOfColumns; i++) - { - if (tfd_quoteDetected(aColumns[i])) return tinyfd_arrayDialog("INVALID COLUMNS WITH QUOTES", 0, NULL, 0, NULL); - } - for (i = 0; i < aNumOfRows; i++) - { - if (tfd_quoteDetected(aCells[i])) return tinyfd_arrayDialog("INVALID ROWS WITH QUOTES", 0, NULL, 0, NULL); - } - - lBuff[0]='\0'; - - if ( tfd_zenityPresent() || tfd_matedialogPresent() || tfd_shellementaryPresent() || tfd_qarmaPresent() ) - { - if ( tfd_zenityPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity");return (char *)1;} - strcpy( lDialogString , "zenity" ) ; - if ( (tfd_zenity3Present() >= 4) && !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat( lDialogString, " --attach=$(sleep .01;xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - else if ( tfd_matedialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"matedialog");return (char *)1;} - strcpy( lDialogString , "matedialog" ) ; - } - else if ( tfd_shellementaryPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"shellementary");return (char *)1;} - strcpy( lDialogString , "shellementary" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"qarma");return (char *)1;} - strcpy( lDialogString , "qarma" ) ; - if ( !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - strcat( lDialogString , " --list --print-column=ALL" ) ; - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, " --title=\"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - } - - if ( aColumns && (aNumOfColumns > 0) ) - { - for ( i = 0 ; i < aNumOfColumns ; i ++ ) - { - strcat( lDialogString , " --column=\"" ) ; - strcat( lDialogString , aColumns [i] ) ; - strcat( lDialogString , "\"" ) ; - } - } - - if ( aCells && (aNumOfRows > 0) ) - { - strcat( lDialogString , " " ) ; - for ( i = 0 ; i < aNumOfRows*aNumOfColumns ; i ++ ) - { - strcat( lDialogString , "\"" ) ; - strcat( lDialogString , aCells [i] ) ; - strcat( lDialogString , "\" " ) ; - } - } - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"");return (char *)0;} - return NULL ; - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - if ( ! ( lIn = popen( lDialogString , "r" ) ) ) - { - return NULL ; - } - while ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - {} - pclose( lIn ) ; - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - /* printf( "lBuff: %s\n" , lBuff ) ; */ - if ( ! strlen( lBuff ) ) - { - return NULL ; - } - return lBuff ; -} -#endif /*_WIN32 */ - - -/* not cross platform - UNIX and OSX only */ -/* contributed by srikanth http://sourceforge.net/u/cr1vct/profile */ -#ifndef _WIN32 -char *tinyfd_checklistDialog( - char const *aTitle, - int aNumOfOptions, - char const *const *aOptions) -{ - static char lBuff[MAX_PATH_OR_CMD]; - static char dest[MAX_PATH_OR_CMD]; - - char lDialogString[MAX_PATH_OR_CMD]; - FILE *lIn; - int i ; - char *target = lDialogString; - - if (tfd_quoteDetected(aTitle)) return tinyfd_checklistDialog("INVALID TITLE WITH QUOTES", aNumOfOptions, aOptions); - for (i = 0; i < aNumOfOptions; i++) - { - if (tfd_quoteDetected(aOptions[i])) return tinyfd_checklistDialog("INVALID COLUMNS WITH QUOTES", 0, NULL); - } - - lBuff[0] = '\0'; - if (tfd_isDarwin()) - { - target += sprintf(target, "osascript -e \'set Choices to {"); - for (i = 0; i < aNumOfOptions; i++) - { - if (i != aNumOfOptions - 1) - target += sprintf(target, "\"%s\", ", aOptions[i]); - else - target += sprintf(target, "\"%s\"", aOptions[i]); - } - target += sprintf(target, "}\' -e \'set Choice to choose from list Choices with prompt \"%s\" with multiple selections allowed\' -e \'Choice\'", aTitle); - } - - else if (tfd_kdialogPresent()) - { - target += sprintf(target, "kdialog --checklist \'%s\' ", aTitle); - for (i = 0; i < aNumOfOptions; i++) - { - target += sprintf(target, "\'%s\' \'%s\' OFF ", aOptions[i], aOptions[i]); - } - } - else if (tfd_zenityPresent()) - { - target += sprintf(target, "zenity --list --column= --column= --checklist --title=\'%s\' ", aTitle); - for (i = 0; i < aNumOfOptions; i++) - { - target += sprintf(target, "\'\' \'%s\' ", aOptions[i]); - } - } - if (tinyfd_verbose) - printf("lDialogString: %s\n", lDialogString); - if (!(lIn = popen(lDialogString, "r"))) - { - return NULL; - } - while (fgets(lBuff, sizeof(lBuff), lIn) != NULL) - { - } - pclose(lIn); - if (lBuff[strlen(lBuff) - 1] == '\n') - { - lBuff[strlen(lBuff) - 1] = '\0'; - } - /* printf( "lBuff: %s\n" , lBuff ) ; */ - if (!strlen(lBuff)) - { - return NULL; - } - if (tfd_kdialogPresent()) - { - tfd_replaceSubStr(lBuff, "\" \"", "|", dest); - dest[strlen(dest) - 2] = '\0'; - return dest + 1; - } - if (tfd_isDarwin()) - { - tfd_replaceSubStr(lBuff, "\", \"", "|", dest); - dest[strlen(dest) - 2] = '\0'; - dest[strlen(dest) - 3] = '\0'; - return dest + 2; - } - return lBuff; -} -#endif /*_WIN32 */ diff --git a/libs/tinyfiledialogs/more_dialogs/tinyfd_moredialogs.h b/libs/tinyfiledialogs/more_dialogs/tinyfd_moredialogs.h deleted file mode 100644 index 07bfea8..0000000 --- a/libs/tinyfiledialogs/more_dialogs/tinyfd_moredialogs.h +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - _________ - / \ tinyfiledialogs v3.9.0 [Nov 3, 2022] - |tiny file| - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - - - License - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/* not cross platform - unix zenity only */ -/* contributed by Attila Dusnoki */ -#ifndef _WIN32 -char * tinyfd_arrayDialog( - char const * aTitle , /* NULL or "" */ - int aNumOfColumns , /* 2 */ - char const * const * aColumns, /* {"Column 1","Column 2"} */ - int aNumOfRows, /* 2 */ - char const * const * aCells); - /* {"Row1 Col1","Row1 Col2","Row2 Col1","Row2 Col2"} */ -#endif /*_WIN32 */ - -/* not cross platform - UNIX and OSX only */ -/* contributed by srikanth http://sourceforge.net/u/cr1vct/profile */ -#ifndef _WIN32 -char * tinyfd_checklistDialog( - char const * aTitle , - int aNumOfOptions , - char const * const * aOptions); -#endif /*_WIN32 */ |
