GlistEngine
Loading...
Searching...
No Matches
tinyfiledialogs.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
#include <limits.h>
#include <unistd.h>
#include <dirent.h>
#include <termios.h>
#include <sys/utsname.h>
#include <signal.h>
#include "tinyfiledialogs.h"
Include dependency graph for tinyfiledialogs.c:

Macros

#define TINYFD_SLASH   "/"
 
#define MAX_PATH_OR_CMD   1024 /* _MAX_PATH or MAX_PATH */
 
#define MAX_MULTIPLE_FILES   1024
 
#define LOW_MULTIPLE_FILES   32
 

Functions

void tfd_replaceSubStr (char const *aSource, char const *aOldSubStr, char const *aNewSubStr, char *aoDestination)
 
int tfd_quoteDetected (char const *aString)
 
char const * tinyfd_getGlobalChar (char const *aCharVariableName)
 
int tinyfd_getGlobalInt (char const *aIntVariableName)
 
int tinyfd_setGlobalInt (char const *aIntVariableName, int aValue)
 
int tfd_isDarwin (void)
 
int isDialogVersionBetter09b (void)
 
int tfd_qarmaPresent (void)
 
int tfd_matedialogPresent (void)
 
int tfd_shellementaryPresent (void)
 
int tfd_xpropPresent (void)
 
int tfd_zenityPresent (void)
 
int tfd_yadPresent (void)
 
int tfd_zenity3Present (void)
 
int tfd_kdialogPresent (void)
 
void tinyfd_beep (void)
 
int tinyfd_messageBox (char const *aTitle, char const *aMessage, char const *aDialogType, char const *aIconType, int aDefaultButton)
 
int tinyfd_notifyPopup (char const *aTitle, char const *aMessage, char const *aIconType)
 
char * tinyfd_inputBox (char const *aTitle, char const *aMessage, char const *aDefaultInput)
 
char * tinyfd_saveFileDialog (char const *aTitle, char const *aDefaultPathAndOrFile, int aNumOfFilterPatterns, char const *const *aFilterPatterns, char const *aSingleFilterDescription)
 
char * tinyfd_openFileDialog (char const *aTitle, char const *aDefaultPathAndOrFile, int aNumOfFilterPatterns, char const *const *aFilterPatterns, char const *aSingleFilterDescription, int aAllowMultipleSelects)
 
char * tinyfd_selectFolderDialog (char const *aTitle, char const *aDefaultPath)
 
char * tinyfd_colorChooser (char const *aTitle, char const *aDefaultHexRGB, unsigned char const aDefaultRGB[3], unsigned char aoResultRGB[3])
 
void tfd_messageBox (char const *aTitle, char const *aMessage, char const *aDialogType, char const *aIconType, int *aiDefaultButton)
 
void tfd_inputBox (char const *aTitle, char const *aMessage, char **aiDefaultInput)
 
void tfd_saveFileDialog (char const *aTitle, char **aiDefaultPathAndFile, int const *aNumOfFilterPatterns, char const *const *aFilterPatterns, char const *aSingleFilterDescription)
 
void tfd_openFileDialog (char const *aTitle, char **aiDefaultPathAndFile, int const *aNumOfFilterPatterns, char const *const *aFilterPatterns, char const *aSingleFilterDescription, int const *aAllowMultipleSelects)
 
void tfd_selectFolderDialog (char const *aTitle, char **aiDefaultPath)
 
void tfd_colorChooser (char const *aTitle, char **aiDefaultHexRGB)
 

Variables

char tinyfd_version [8] = "3.20.1"
 
int tinyfd_verbose = 0
 
int tinyfd_silent = 1
 
int tinyfd_allowCursesDialogs = 0
 
int tinyfd_forceConsole = 0
 
char tinyfd_response [1024]
 
char tinyfd_needs []
 

Macro Definition Documentation

◆ LOW_MULTIPLE_FILES

#define LOW_MULTIPLE_FILES   32

◆ MAX_MULTIPLE_FILES

#define MAX_MULTIPLE_FILES   1024

◆ MAX_PATH_OR_CMD

#define MAX_PATH_OR_CMD   1024 /* _MAX_PATH or MAX_PATH */

◆ TINYFD_SLASH

#define TINYFD_SLASH   "/"

Function Documentation

◆ isDialogVersionBetter09b()

int isDialogVersionBetter09b ( void  )

◆ tfd_colorChooser()

void tfd_colorChooser ( char const *  aTitle,
char **  aiDefaultHexRGB 
)

◆ tfd_inputBox()

void tfd_inputBox ( char const *  aTitle,
char const *  aMessage,
char **  aiDefaultInput 
)

◆ tfd_isDarwin()

int tfd_isDarwin ( void  )

◆ tfd_kdialogPresent()

int tfd_kdialogPresent ( void  )

◆ tfd_matedialogPresent()

int tfd_matedialogPresent ( void  )

◆ tfd_messageBox()

void tfd_messageBox ( char const *  aTitle,
char const *  aMessage,
char const *  aDialogType,
char const *  aIconType,
int *  aiDefaultButton 
)

◆ tfd_openFileDialog()

void tfd_openFileDialog ( char const *  aTitle,
char **  aiDefaultPathAndFile,
int const *  aNumOfFilterPatterns,
char const *const *  aFilterPatterns,
char const *  aSingleFilterDescription,
int const *  aAllowMultipleSelects 
)

◆ tfd_qarmaPresent()

int tfd_qarmaPresent ( void  )

◆ tfd_quoteDetected()

int tfd_quoteDetected ( char const *  aString)

◆ tfd_replaceSubStr()

void tfd_replaceSubStr ( char const *  aSource,
char const *  aOldSubStr,
char const *  aNewSubStr,
char *  aoDestination 
)

◆ tfd_saveFileDialog()

void tfd_saveFileDialog ( char const *  aTitle,
char **  aiDefaultPathAndFile,
int const *  aNumOfFilterPatterns,
char const *const *  aFilterPatterns,
char const *  aSingleFilterDescription 
)

◆ tfd_selectFolderDialog()

void tfd_selectFolderDialog ( char const *  aTitle,
char **  aiDefaultPath 
)

◆ tfd_shellementaryPresent()

int tfd_shellementaryPresent ( void  )

◆ tfd_xpropPresent()

int tfd_xpropPresent ( void  )

◆ tfd_yadPresent()

int tfd_yadPresent ( void  )

◆ tfd_zenity3Present()

int tfd_zenity3Present ( void  )

◆ tfd_zenityPresent()

int tfd_zenityPresent ( void  )

◆ tinyfd_beep()

void tinyfd_beep ( void  )

◆ tinyfd_colorChooser()

char * tinyfd_colorChooser ( char const *  aTitle,
char const *  aDefaultHexRGB,
unsigned char const  aDefaultRGB[3],
unsigned char  aoResultRGB[3] 
)

◆ tinyfd_getGlobalChar()

char const * tinyfd_getGlobalChar ( char const *  aCharVariableName)

◆ tinyfd_getGlobalInt()

int tinyfd_getGlobalInt ( char const *  aIntVariableName)

◆ tinyfd_inputBox()

char * tinyfd_inputBox ( char const *  aTitle,
char const *  aMessage,
char const *  aDefaultInput 
)

◆ tinyfd_messageBox()

int tinyfd_messageBox ( char const *  aTitle,
char const *  aMessage,
char const *  aDialogType,
char const *  aIconType,
int  aDefaultButton 
)

◆ tinyfd_notifyPopup()

int tinyfd_notifyPopup ( char const *  aTitle,
char const *  aMessage,
char const *  aIconType 
)

◆ tinyfd_openFileDialog()

char * tinyfd_openFileDialog ( char const *  aTitle,
char const *  aDefaultPathAndOrFile,
int  aNumOfFilterPatterns,
char const *const *  aFilterPatterns,
char const *  aSingleFilterDescription,
int  aAllowMultipleSelects 
)

◆ tinyfd_saveFileDialog()

char * tinyfd_saveFileDialog ( char const *  aTitle,
char const *  aDefaultPathAndOrFile,
int  aNumOfFilterPatterns,
char const *const *  aFilterPatterns,
char const *  aSingleFilterDescription 
)

◆ tinyfd_selectFolderDialog()

char * tinyfd_selectFolderDialog ( char const *  aTitle,
char const *  aDefaultPath 
)

◆ tinyfd_setGlobalInt()

int tinyfd_setGlobalInt ( char const *  aIntVariableName,
int  aValue 
)

Variable Documentation

◆ tinyfd_allowCursesDialogs

int tinyfd_allowCursesDialogs = 0

Curses dialogs are difficult to use and counter-intuitive. On windows they are only ascii and still uses the unix backslash !

◆ tinyfd_forceConsole

int tinyfd_forceConsole = 0

◆ tinyfd_needs

char tinyfd_needs[]
Initial value:
= "\
___________\n\
/ \\ \n\
| tiny file |\n\
| dialogs |\n\
\\_____ ____/\n\
\\|\
\ntiny file dialogs on UNIX needs:\
\n applescript or kdialog or yad or Xdialog\
\nor zenity (or matedialog or shellementary or qarma)\
\nor python (2 or 3) + tkinter + python-dbus (optional)\
\nor dialog (opens console if needed) ** Disabled by default **\
\nor xterm + bash (opens console for basic input)\
\nor existing console for basic input."

◆ tinyfd_response

char tinyfd_response[1024]

◆ tinyfd_silent

int tinyfd_silent = 1

◆ tinyfd_verbose

int tinyfd_verbose = 0

◆ tinyfd_version

char tinyfd_version[8] = "3.20.1"