36#ifndef FL_SYSTEM_DRIVER_H
37#define FL_SYSTEM_DRIVER_H
40#include <FL/Fl_Export.H>
42#include <FL/Fl_Preferences.H>
53class Fl_Sys_Menu_Bar_Driver;
60class Fl_System_Driver {
64 static Fl_System_Driver *newSystemDriver();
66 static bool awake_ring_empty();
68 virtual ~Fl_System_Driver();
69 static int command_key;
70 static int control_key;
73 virtual int single_arg(
const char *) {
return 0; }
75 virtual int arg_and_value(
const char * ,
const char * ) {
return 0; }
76 static void warning(
const char* format, ...);
78 virtual void warning(
const char* format, va_list
args);
79 static void error(
const char* format, ...);
81 virtual void error(
const char* format, va_list
args);
82 static void fatal(
const char* format, ...);
84 virtual void fatal(
const char* format, va_list
args);
87 virtual char *utf2mbcs(
const char *s) {
return (
char*)s;}
88 virtual char *getenv(
const char*) {
return NULL;}
89 virtual int putenv(
const char *) {
return -1;}
90 virtual int open(
const char* ,
int ,
int ) {
return -1;}
93 virtual char *strdup(
const char *) {
return NULL;}
97 virtual int open_ext(
const char* f,
int ,
int oflags,
int pmode) {
98 return this->open(f, oflags, pmode);
100 virtual FILE *fopen(
const char* f,
const char *mode);
101 virtual int system(
const char*) {
return -1;}
102 virtual int execvp(
const char * ,
char *
const * ) {
return -1;}
103 virtual int chmod(
const char* ,
int ) {
return -1;}
104 virtual int access(
const char* ,
int ) {
return -1;}
105 virtual int flstat(
const char* ,
struct stat *) {
return -1;}
106 virtual char *getcwd(
char* ,
int ) {
return NULL;}
107 virtual int chdir(
const char*) {
return -1;}
108 virtual int unlink(
const char*) {
return -1;}
109 virtual int mkdir(
const char* ,
int ) {
return -1;}
110 virtual int rmdir(
const char*) {
return -1;}
111 virtual int rename(
const char* ,
const char * ) {
return -1;}
115 virtual int args_to_utf8(
int argc,
char ** &argv) {
return argc; }
118 virtual unsigned utf8towc(
const char* src,
unsigned srclen,
wchar_t* dst,
unsigned dstlen);
119 virtual unsigned utf8fromwc(
char* dst,
unsigned dstlen,
const wchar_t* src,
unsigned srclen);
120 virtual int utf8locale() {
return 1;}
121 virtual unsigned utf8to_mb(
const char* src,
unsigned srclen,
char* dst,
unsigned dstlen);
122 virtual unsigned utf8from_mb(
char* dst,
unsigned dstlen,
const char* src,
unsigned srclen);
124 virtual int clocale_vprintf(FILE *output,
const char *format, va_list
args);
125 virtual int clocale_vsnprintf(
char *output,
size_t output_size,
const char *format, va_list
args);
126 virtual int clocale_vsscanf(
const char *input,
const char *format, va_list
args);
128 virtual int filename_list(
const char * , dirent ***,
129 int (* )(
struct dirent **,
struct dirent **),
130 char *errmsg=NULL,
int errmsg_sz=0) {
131 (void)errmsg; (void)errmsg_sz;
135 virtual int filename_expand(
char *to,
int tolen,
const char *from);
137 virtual const char *getpwnam(
const char *) {
return NULL;}
139 virtual int filename_relative(
char *to,
int tolen,
const char *from,
const char *base);
141 virtual int filename_absolute(
char *to,
int tolen,
const char *from,
const char *base);
143 virtual int filename_isdir(
const char* n);
145 virtual int filename_isdir_quick(
const char* n);
147 virtual const char *filename_ext(
const char *buf);
149 virtual const char *filename_name(
const char *buf) {
return buf;}
151 virtual int open_uri(
const char * ,
char * ,
int ) {
return 0;}
153 virtual int use_tooltip_timeout_condition() {
return 0;}
155 virtual int use_recent_tooltip_fix() {
return 0;}
157 virtual int need_test_shortcut_extra() {
return 0;}
161 virtual int file_browser_load_directory(
const char *directory,
char *filename,
size_t name_size,
163 char *errmsg=NULL,
int errmsg_sz=0);
165 virtual void newUUID(
char *uuidBuffer) { uuidBuffer[0] = 0; }
169 const char * ) {
return NULL;}
171 virtual int preferences_need_protection_check() {
return 0;}
173 virtual void *load(
const char *) {
return NULL;}
175 virtual void png_extra_rgba_processing(
unsigned char * ,
int ,
int ) {}
177 virtual const char *next_dir_sep(
const char *start) {
return strchr(start,
'/');}
179 virtual void awake(
void*) {}
180 virtual int lock() {
return 1;}
184 virtual int file_type(
const char *filename);
186 virtual const char *home_directory_name() {
return ""; }
188 virtual const char *filesystems_label() {
return "File Systems"; }
190 virtual int backslash_as_slash() {
return 0;}
192 virtual int colon_is_drive() {
return 0;}
194 virtual int dot_file_hidden() {
return 0;}
196 virtual int case_insensitive_filenames() {
return 0;}
198 virtual const char *local_to_latin1(
const char *t,
int n);
199 virtual const char *latin1_to_local(
const char *t,
int n);
201 virtual const char *local_to_mac_roman(
const char *t,
int n);
202 virtual const char *mac_roman_to_local(
const char *t,
int n);
204 virtual void tree_draw_expando_button(
int x,
int y,
bool state,
bool active);
206 virtual int tree_connector_style();
212 virtual void open_callback(
void (*)(
const char *));
214 virtual void gettime(time_t *sec,
int *usec);
216 virtual const char *shift_name() {
return "Shift"; }
217 virtual const char *meta_name() {
return "Meta"; }
218 virtual const char *alt_name() {
return "Alt"; }
219 virtual const char *control_name() {
return "Ctrl"; }
220 virtual Fl_Sys_Menu_Bar_Driver *sys_menu_bar_driver() {
return NULL; }
221 virtual void lock_ring() {}
222 virtual void unlock_ring() {}
223 virtual double wait(
double);
224 virtual int ready() {
return 0; }
225 virtual int close_fd(
int) {
return -1;}
The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons.
Definition Fl_File_Browser.H:37
The Fl_File_Icon class manages icon images that can be used as labels in other widgets and as icons i...
Definition Fl_File_Icon.H:45
The Fl_Pixmap class supports caching and drawing of colormap (pixmap) images, including transparency.
Definition Fl_Pixmap.H:36
Fl_Preferences store user settings between application starts.
Definition Fl_Preferences.H:125
Root
Define the scope of the preferences.
Definition Fl_Preferences.H:131
The Fl is the FLTK global (static) class containing state information and global methods for the curr...
Definition Fl.H:140
static int wait()
Waits until "something happens" and then returns.
Definition Fl.cxx:672
static int args(int argc, char **argv, int &i, Fl_Args_Handler cb=0)
Parse command line switches using the cb argument handler.
Definition Fl_arg.cxx:276
static int system(const char *command)
Run a command line on the computer.
Definition Fl.cxx:2434
static int ready()
This is similar to Fl::check() except this does not call Fl::flush() or any callbacks,...
Definition Fl.cxx:717
static void remove_fd(int, int when)
Removes a file descriptor handler.
Definition Fl.cxx:2241
static void add_fd(int fd, int when, Fl_FD_Handler cb, void *=0)
Adds file descriptor fd to listen to.
Definition Fl.cxx:2228
static int args_to_utf8(int argc, char **&argv)
Convert Windows commandline arguments to UTF-8.
Definition Fl.cxx:2514
File names and URI utility functions.
void(* Fl_FD_Handler)(FL_SOCKET fd, void *data)
Signature of add_fd functions passed as parameters.
Definition Fl.H:109
int Fl_File_Sort_F(struct dirent **, struct dirent **)
File sorting function.
Definition filename.H:114
static void unlock()
The unlock() method releases the lock that was set using the lock() method.
Definition Fl_lock.cxx:204
static void * thread_message()
The thread_message() method returns the last message that was sent from a child by the awake() method...
Definition Fl_lock.cxx:196
static void awake(void *message=0)
Sends a message pointer to the main thread, causing any pending Fl::wait() call to terminate so that ...
Definition Fl_lock.cxx:192
static int lock()
The lock() method blocks the current thread until it can safely access FLTK widgets and data.
Definition Fl_lock.cxx:200
static int x()
Returns the leftmost x coordinate of the main screen work area.
Definition screen_xywh.cxx:31
static int y()
Returns the topmost y coordinate of the main screen work area.
Definition screen_xywh.cxx:38
static void(* error)(const char *,...)
FLTK calls Fl::error() to output a normal error message.
Definition Fl.H:546
static void(* fatal)(const char *,...)
FLTK calls Fl::fatal() to output a fatal error message.
Definition Fl.H:563
static void(* warning)(const char *,...)
FLTK calls Fl::warning() to output a warning message.
Definition Fl.H:531