diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-11-10 18:56:47 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-11-10 18:56:47 +1100 |
commit | faabff73b74307cdec73264116291857d679aef7 (patch) | |
tree | ac97da959e446e58a2e401b2a6ff98d05bc75ec5 | |
parent | e0ee146d740146cd4c80de22d6bf6e204efadfa0 (diff) |
Renamed popups to dialogs
-rw-r--r-- | c_fl_dialog.cpp | 32 | ||||
-rw-r--r-- | c_fl_dialog.h | 15 | ||||
-rw-r--r-- | c_fl_popup.cpp | 32 | ||||
-rw-r--r-- | c_fl_popup.h | 15 | ||||
-rw-r--r-- | fltk-dialogs.adb (renamed from fltk-popups.adb) | 34 | ||||
-rw-r--r-- | fltk-dialogs.ads (renamed from fltk-popups.ads) | 4 |
6 files changed, 66 insertions, 66 deletions
diff --git a/c_fl_dialog.cpp b/c_fl_dialog.cpp new file mode 100644 index 0000000..cb6d305 --- /dev/null +++ b/c_fl_dialog.cpp @@ -0,0 +1,32 @@ + + +#include <FL/fl_ask.H> +#include <FL/Fl_File_Chooser.H> +#include <FL/Fl_Color_Chooser.H> +#include "c_fl_dialog.h" + + +void dialog_fl_alert(const char * m) { + fl_alert(m); +} + + +int dialog_fl_choice(const char * m, const char * a, const char * b, const char * c) { + return fl_choice(m, a, b, c); +} + + +char * dialog_fl_file_chooser(const char * m, const char * p, const char * d, int r) { + return fl_file_chooser(m, p, d, r); +} + + +const char * dialog_fl_input(const char * m, const char * d) { + return fl_input(m, d); +} + + +void dialog_fl_message(const char * m) { + fl_message(m); +} + diff --git a/c_fl_dialog.h b/c_fl_dialog.h new file mode 100644 index 0000000..6804022 --- /dev/null +++ b/c_fl_dialog.h @@ -0,0 +1,15 @@ + + +#ifndef FL_DIALOG_GUARD +#define FL_DIALOG_GUARD + + +extern "C" void dialog_fl_alert(const char * m); +extern "C" int dialog_fl_choice(const char * m, const char * a, const char * b, const char * c); +extern "C" char * dialog_fl_file_chooser(const char * m, const char * p, const char * d, int r); +extern "C" const char * dialog_fl_input(const char * m, const char * d); +extern "C" void dialog_fl_message(const char * m); + + +#endif + diff --git a/c_fl_popup.cpp b/c_fl_popup.cpp deleted file mode 100644 index 913ec51..0000000 --- a/c_fl_popup.cpp +++ /dev/null @@ -1,32 +0,0 @@ - - -#include <FL/fl_ask.H> -#include <FL/Fl_File_Chooser.H> -#include <FL/Fl_Color_Chooser.H> -#include "c_fl_popup.h" - - -void popup_fl_alert(const char * m) { - fl_alert(m); -} - - -int popup_fl_choice(const char * m, const char * a, const char * b, const char * c) { - return fl_choice(m, a, b, c); -} - - -char * popup_fl_file_chooser(const char * m, const char * p, const char * d, int r) { - return fl_file_chooser(m, p, d, r); -} - - -const char * popup_fl_input(const char * m, const char * d) { - return fl_input(m, d); -} - - -void popup_fl_message(const char * m) { - fl_message(m); -} - diff --git a/c_fl_popup.h b/c_fl_popup.h deleted file mode 100644 index ff0f9ac..0000000 --- a/c_fl_popup.h +++ /dev/null @@ -1,15 +0,0 @@ - - -#ifndef FL_POPUP_GUARD -#define FL_POPUP_GUARD - - -extern "C" void popup_fl_alert(const char * m); -extern "C" int popup_fl_choice(const char * m, const char * a, const char * b, const char * c); -extern "C" char * popup_fl_file_chooser(const char * m, const char * p, const char * d, int r); -extern "C" const char * popup_fl_input(const char * m, const char * d); -extern "C" void popup_fl_message(const char * m); - - -#endif - diff --git a/fltk-popups.adb b/fltk-dialogs.adb index d6ac8e9..fed4070 100644 --- a/fltk-popups.adb +++ b/fltk-dialogs.adb @@ -5,32 +5,32 @@ with Interfaces.C.Strings; use type Interfaces.C.Strings.chars_ptr; -package body FLTK.Popups is +package body FLTK.Dialogs is - procedure popup_fl_alert + procedure dialog_fl_alert (M : in Interfaces.C.char_array); - pragma Import (C, popup_fl_alert, "popup_fl_alert"); + pragma Import (C, dialog_fl_alert, "dialog_fl_alert"); - function popup_fl_choice + function dialog_fl_choice (M, A, B, C : in Interfaces.C.char_array) return Interfaces.C.int; - pragma Import (C, popup_fl_choice, "popup_fl_choice"); + pragma Import (C, dialog_fl_choice, "dialog_fl_choice"); - function popup_fl_file_chooser + function dialog_fl_file_chooser (M, P, D : in Interfaces.C.char_array; R : in Interfaces.C.int) return Interfaces.C.Strings.chars_ptr; - pragma Import (C, popup_fl_file_chooser, "popup_fl_file_chooser"); + pragma Import (C, dialog_fl_file_chooser, "dialog_fl_file_chooser"); - function popup_fl_input + function dialog_fl_input (M, D : in Interfaces.C.char_array) return Interfaces.C.Strings.chars_ptr; - pragma Import (C, popup_fl_input, "popup_fl_input"); + pragma Import (C, dialog_fl_input, "dialog_fl_input"); - procedure popup_fl_message + procedure dialog_fl_message (M : in Interfaces.C.char_array); - pragma Import (C, popup_fl_message, "popup_fl_message"); + pragma Import (C, dialog_fl_message, "dialog_fl_message"); @@ -38,7 +38,7 @@ package body FLTK.Popups is procedure Alert (Message : String) is begin - popup_fl_alert (Interfaces.C.To_C (Message)); + dialog_fl_alert (Interfaces.C.To_C (Message)); end Alert; @@ -48,7 +48,7 @@ package body FLTK.Popups is (Message, Button1, Button2, Button3 : in String) return Choice is - Result : Interfaces.C.int := popup_fl_choice + Result : Interfaces.C.int := dialog_fl_choice (Interfaces.C.To_C (Message), Interfaces.C.To_C (Button1), Interfaces.C.To_C (Button2), @@ -65,7 +65,7 @@ package body FLTK.Popups is Relative : in Boolean := False) return String is - Result : Interfaces.C.Strings.chars_ptr := popup_fl_file_chooser + Result : Interfaces.C.Strings.chars_ptr := dialog_fl_file_chooser (Interfaces.C.To_C (Message), Interfaces.C.To_C (Filter_Pattern), Interfaces.C.To_C (Default), @@ -85,7 +85,7 @@ package body FLTK.Popups is (Message, Default : in String) return String is - Result : Interfaces.C.Strings.chars_ptr := popup_fl_input + Result : Interfaces.C.Strings.chars_ptr := dialog_fl_input (Interfaces.C.To_C (Message), Interfaces.C.To_C (Default)); begin @@ -102,9 +102,9 @@ package body FLTK.Popups is procedure Message_Box (Message : in String) is begin - popup_fl_message (Interfaces.C.To_C (Message)); + dialog_fl_message (Interfaces.C.To_C (Message)); end Message_Box; -end FLTK.Popups; +end FLTK.Dialogs; diff --git a/fltk-popups.ads b/fltk-dialogs.ads index 4b75c9b..cf8f80e 100644 --- a/fltk-popups.ads +++ b/fltk-dialogs.ads @@ -1,6 +1,6 @@ -package FLTK.Popups is +package FLTK.Dialogs is procedure Alert @@ -28,5 +28,5 @@ package FLTK.Popups is (Message : in String); -end FLTK.Popups; +end FLTK.Dialogs; |