summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-08-20 09:57:00 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-08-20 09:57:00 +0200
commitb24379133fff4c55b0eb1a0e82c71dca33474acc (patch)
tree1109f53c394fde53f2482ad594c099dc5b7bc8d5
parentce2f024bce0c4dfdb01a14a797ee8c3bda4757cb (diff)
Add int Fl::system(const char *command) static member function.
-rw-r--r--FL/Fl.H1
-rw-r--r--src/Fl.cxx5
2 files changed, 6 insertions, 0 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index 5c84a8d10..4cee6c7a4 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -1334,6 +1334,7 @@ int main() {
*/
static int draw_GL_text_with_textures() { return draw_GL_text_with_textures_; }
+ static int system(const char *command);
#ifdef FLTK_HAVE_CAIRO
/** \defgroup group_cairo Cairo Support Functions and Classes
diff --git a/src/Fl.cxx b/src/Fl.cxx
index f77a88363..bac2ffa33 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -2098,6 +2098,11 @@ void Fl::keyboard_screen_scaling(int value) {
Fl_Screen_Driver::keyboard_screen_scaling = value;
}
+/** Run a command line on the computer */
+int Fl::system(const char *command) {
+ return Fl::system_driver()->system(command);
+}
+
// Pointers you can use to change FLTK to another language.
// Note: Similar pointers are defined in FL/fl_ask.H and src/fl_ask.cxx
FL_EXPORT const char* fl_local_shift = Fl::system_driver()->shift_name();