summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c_fl_bitmap.cpp10
-rw-r--r--src/c_fl_bitmap.h9
-rw-r--r--src/c_fl_bmp_image.h4
-rw-r--r--src/c_fl_fill_slider.h12
-rw-r--r--src/c_fl_hor_fill_slider.h12
-rw-r--r--src/c_fl_hor_nice_slider.h12
-rw-r--r--src/c_fl_hor_value_slider.cpp26
-rw-r--r--src/c_fl_hor_value_slider.h12
-rw-r--r--src/c_fl_horizontal_slider.h12
-rw-r--r--src/c_fl_image.cpp28
-rw-r--r--src/c_fl_image.h32
-rw-r--r--src/c_fl_jpeg_image.h4
-rw-r--r--src/c_fl_nice_slider.h12
-rw-r--r--src/c_fl_png_image.h4
-rw-r--r--src/c_fl_pnm_image.h4
-rw-r--r--src/c_fl_rgb_image.cpp16
-rw-r--r--src/c_fl_rgb_image.h13
-rw-r--r--src/c_fl_scrollbar.cpp10
-rw-r--r--src/c_fl_scrollbar.h22
-rw-r--r--src/c_fl_shared_image.cpp18
-rw-r--r--src/c_fl_shared_image.h29
-rw-r--r--src/c_fl_slider.cpp11
-rw-r--r--src/c_fl_slider.h28
-rw-r--r--src/c_fl_value_slider.cpp12
-rw-r--r--src/c_fl_value_slider.h24
-rw-r--r--src/c_fl_xbm_image.h4
-rw-r--r--src/fltk-images-bitmaps-xbm.adb2
-rw-r--r--src/fltk-images-bitmaps-xbm.ads3
-rw-r--r--src/fltk-images-bitmaps.adb21
-rw-r--r--src/fltk-images-bitmaps.ads13
-rw-r--r--src/fltk-images-rgb-bmp.adb2
-rw-r--r--src/fltk-images-rgb-bmp.ads3
-rw-r--r--src/fltk-images-rgb-jpeg.adb2
-rw-r--r--src/fltk-images-rgb-jpeg.ads3
-rw-r--r--src/fltk-images-rgb-png.adb2
-rw-r--r--src/fltk-images-rgb-png.ads3
-rw-r--r--src/fltk-images-rgb-pnm.adb2
-rw-r--r--src/fltk-images-rgb-pnm.ads3
-rw-r--r--src/fltk-images-rgb.adb23
-rw-r--r--src/fltk-images-rgb.ads19
-rw-r--r--src/fltk-images-shared.adb25
-rw-r--r--src/fltk-images-shared.ads26
-rw-r--r--src/fltk-images.adb40
-rw-r--r--src/fltk-images.ads33
-rw-r--r--src/fltk-widgets-valuators-sliders-fill.adb6
-rw-r--r--src/fltk-widgets-valuators-sliders-fill.ads9
-rw-r--r--src/fltk-widgets-valuators-sliders-hor_fill.adb6
-rw-r--r--src/fltk-widgets-valuators-sliders-hor_fill.ads9
-rw-r--r--src/fltk-widgets-valuators-sliders-hor_nice.adb6
-rw-r--r--src/fltk-widgets-valuators-sliders-hor_nice.ads9
-rw-r--r--src/fltk-widgets-valuators-sliders-horizontal.adb6
-rw-r--r--src/fltk-widgets-valuators-sliders-horizontal.ads9
-rw-r--r--src/fltk-widgets-valuators-sliders-nice.adb6
-rw-r--r--src/fltk-widgets-valuators-sliders-nice.ads9
-rw-r--r--src/fltk-widgets-valuators-sliders-scrollbars.adb11
-rw-r--r--src/fltk-widgets-valuators-sliders-scrollbars.ads16
-rw-r--r--src/fltk-widgets-valuators-sliders-value-horizontal.adb6
-rw-r--r--src/fltk-widgets-valuators-sliders-value-horizontal.ads9
-rw-r--r--src/fltk-widgets-valuators-sliders-value.adb12
-rw-r--r--src/fltk-widgets-valuators-sliders-value.ads17
-rw-r--r--src/fltk-widgets-valuators-sliders.adb59
-rw-r--r--src/fltk-widgets-valuators-sliders.ads42
62 files changed, 653 insertions, 199 deletions
diff --git a/src/c_fl_bitmap.cpp b/src/c_fl_bitmap.cpp
index ce1c221..38665b5 100644
--- a/src/c_fl_bitmap.cpp
+++ b/src/c_fl_bitmap.cpp
@@ -4,12 +4,14 @@
#include "c_fl_bitmap.h"
+
+
void free_fl_bitmap(BITMAP b) {
delete reinterpret_cast<Fl_Bitmap*>(b);
}
BITMAP fl_bitmap_copy(BITMAP b, int w, int h) {
- return reinterpret_cast<Fl_Bitmap*>(b)->copy(w, h);
+ return reinterpret_cast<Fl_Bitmap*>(b)->Fl_Bitmap::copy(w, h);
}
BITMAP fl_bitmap_copy2(BITMAP b) {
@@ -19,7 +21,11 @@ BITMAP fl_bitmap_copy2(BITMAP b) {
+void fl_bitmap_draw2(BITMAP b, int x, int y) {
+ reinterpret_cast<Fl_Bitmap*>(b)->draw(x, y);
+}
+
void fl_bitmap_draw(BITMAP b, int x, int y, int w, int h, int cx, int cy) {
- reinterpret_cast<Fl_Bitmap*>(b)->draw(x, y, w, h, cx, cy);
+ reinterpret_cast<Fl_Bitmap*>(b)->Fl_Bitmap::draw(x, y, w, h, cx, cy);
}
diff --git a/src/c_fl_bitmap.h b/src/c_fl_bitmap.h
index 3caab69..2bc1cca 100644
--- a/src/c_fl_bitmap.h
+++ b/src/c_fl_bitmap.h
@@ -11,12 +11,13 @@ typedef void* BITMAP;
-extern "C" void free_fl_bitmap(BITMAP b);
-extern "C" BITMAP fl_bitmap_copy(BITMAP b, int w, int h);
-extern "C" BITMAP fl_bitmap_copy2(BITMAP b);
+extern "C" inline void free_fl_bitmap(BITMAP b);
+extern "C" inline BITMAP fl_bitmap_copy(BITMAP b, int w, int h);
+extern "C" inline BITMAP fl_bitmap_copy2(BITMAP b);
-extern "C" void fl_bitmap_draw(BITMAP b, int x, int y, int w, int h, int cx, int cy);
+extern "C" inline void fl_bitmap_draw2(BITMAP b, int x, int y);
+extern "C" inline void fl_bitmap_draw(BITMAP b, int x, int y, int w, int h, int cx, int cy);
#endif
diff --git a/src/c_fl_bmp_image.h b/src/c_fl_bmp_image.h
index 1f9b8df..a233c3b 100644
--- a/src/c_fl_bmp_image.h
+++ b/src/c_fl_bmp_image.h
@@ -11,8 +11,8 @@ typedef void* BMP_IMAGE;
-extern "C" BMP_IMAGE new_fl_bmp_image(const char * f);
-extern "C" void free_fl_bmp_image(BMP_IMAGE b);
+extern "C" inline BMP_IMAGE new_fl_bmp_image(const char * f);
+extern "C" inline void free_fl_bmp_image(BMP_IMAGE b);
#endif
diff --git a/src/c_fl_fill_slider.h b/src/c_fl_fill_slider.h
index ac9a125..35925a1 100644
--- a/src/c_fl_fill_slider.h
+++ b/src/c_fl_fill_slider.h
@@ -11,16 +11,16 @@ typedef void* FILL_SLIDER;
-extern "C" void fill_slider_set_draw_hook(FILL_SLIDER s, void * d);
-extern "C" void fl_fill_slider_draw(FILL_SLIDER s);
-extern "C" void fill_slider_set_handle_hook(FILL_SLIDER s, void * h);
-extern "C" int fl_fill_slider_handle(FILL_SLIDER s, int e);
+extern "C" inline void fill_slider_set_draw_hook(FILL_SLIDER s, void * d);
+extern "C" inline void fl_fill_slider_draw(FILL_SLIDER s);
+extern "C" inline void fill_slider_set_handle_hook(FILL_SLIDER s, void * h);
+extern "C" inline int fl_fill_slider_handle(FILL_SLIDER s, int e);
-extern "C" FILL_SLIDER new_fl_fill_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_fill_slider(FILL_SLIDER s);
+extern "C" inline FILL_SLIDER new_fl_fill_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_fill_slider(FILL_SLIDER s);
#endif
diff --git a/src/c_fl_hor_fill_slider.h b/src/c_fl_hor_fill_slider.h
index 95ac72f..ebed13a 100644
--- a/src/c_fl_hor_fill_slider.h
+++ b/src/c_fl_hor_fill_slider.h
@@ -11,16 +11,16 @@ typedef void* HOR_FILL_SLIDER;
-extern "C" void hor_fill_slider_set_draw_hook(HOR_FILL_SLIDER s, void * d);
-extern "C" void fl_hor_fill_slider_draw(HOR_FILL_SLIDER s);
-extern "C" void hor_fill_slider_set_handle_hook(HOR_FILL_SLIDER s, void * h);
-extern "C" int fl_hor_fill_slider_handle(HOR_FILL_SLIDER s, int e);
+extern "C" inline void hor_fill_slider_set_draw_hook(HOR_FILL_SLIDER s, void * d);
+extern "C" inline void fl_hor_fill_slider_draw(HOR_FILL_SLIDER s);
+extern "C" inline void hor_fill_slider_set_handle_hook(HOR_FILL_SLIDER s, void * h);
+extern "C" inline int fl_hor_fill_slider_handle(HOR_FILL_SLIDER s, int e);
-extern "C" HOR_FILL_SLIDER new_fl_hor_fill_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_hor_fill_slider(HOR_FILL_SLIDER s);
+extern "C" inline HOR_FILL_SLIDER new_fl_hor_fill_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_hor_fill_slider(HOR_FILL_SLIDER s);
#endif
diff --git a/src/c_fl_hor_nice_slider.h b/src/c_fl_hor_nice_slider.h
index 990fc76..bd5daba 100644
--- a/src/c_fl_hor_nice_slider.h
+++ b/src/c_fl_hor_nice_slider.h
@@ -11,16 +11,16 @@ typedef void* HOR_NICE_SLIDER;
-extern "C" void hor_nice_slider_set_draw_hook(HOR_NICE_SLIDER s, void * d);
-extern "C" void fl_hor_nice_slider_draw(HOR_NICE_SLIDER s);
-extern "C" void hor_nice_slider_set_handle_hook(HOR_NICE_SLIDER s, void * h);
-extern "C" int fl_hor_nice_slider_handle(HOR_NICE_SLIDER s, int e);
+extern "C" inline void hor_nice_slider_set_draw_hook(HOR_NICE_SLIDER s, void * d);
+extern "C" inline void fl_hor_nice_slider_draw(HOR_NICE_SLIDER s);
+extern "C" inline void hor_nice_slider_set_handle_hook(HOR_NICE_SLIDER s, void * h);
+extern "C" inline int fl_hor_nice_slider_handle(HOR_NICE_SLIDER s, int e);
-extern "C" HOR_NICE_SLIDER new_fl_hor_nice_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_hor_nice_slider(HOR_NICE_SLIDER s);
+extern "C" inline HOR_NICE_SLIDER new_fl_hor_nice_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_hor_nice_slider(HOR_NICE_SLIDER s);
#endif
diff --git a/src/c_fl_hor_value_slider.cpp b/src/c_fl_hor_value_slider.cpp
index fe29ef8..fa3305c 100644
--- a/src/c_fl_hor_value_slider.cpp
+++ b/src/c_fl_hor_value_slider.cpp
@@ -68,29 +68,3 @@ void free_fl_hor_value_slider(HOR_VALUE_SLIDER s) {
}
-
-
-unsigned int fl_hor_value_slider_get_textcolor(HOR_VALUE_SLIDER s) {
- return reinterpret_cast<My_Hor_Value_Slider*>(s)->textcolor();
-}
-
-void fl_hor_value_slider_set_textcolor(HOR_VALUE_SLIDER s, unsigned int t) {
- reinterpret_cast<My_Hor_Value_Slider*>(s)->textcolor(t);
-}
-
-int fl_hor_value_slider_get_textfont(HOR_VALUE_SLIDER s) {
- return reinterpret_cast<My_Hor_Value_Slider*>(s)->textfont();
-}
-
-void fl_hor_value_slider_set_textfont(HOR_VALUE_SLIDER s, int t) {
- reinterpret_cast<My_Hor_Value_Slider*>(s)->textfont(t);
-}
-
-int fl_hor_value_slider_get_textsize(HOR_VALUE_SLIDER s) {
- return reinterpret_cast<My_Hor_Value_Slider*>(s)->textsize();
-}
-
-void fl_hor_value_slider_set_textsize(HOR_VALUE_SLIDER s, int t) {
- reinterpret_cast<My_Hor_Value_Slider*>(s)->textsize(t);
-}
-
diff --git a/src/c_fl_hor_value_slider.h b/src/c_fl_hor_value_slider.h
index 7e682f5..e1ccfd7 100644
--- a/src/c_fl_hor_value_slider.h
+++ b/src/c_fl_hor_value_slider.h
@@ -11,16 +11,16 @@ typedef void* HOR_VALUE_SLIDER;
-extern "C" void hor_value_slider_set_draw_hook(HOR_VALUE_SLIDER s, void * d);
-extern "C" void fl_hor_value_slider_draw(HOR_VALUE_SLIDER s);
-extern "C" void hor_value_slider_set_handle_hook(HOR_VALUE_SLIDER s, void * h);
-extern "C" int fl_hor_value_slider_handle(HOR_VALUE_SLIDER s, int e);
+extern "C" inline void hor_value_slider_set_draw_hook(HOR_VALUE_SLIDER s, void * d);
+extern "C" inline void fl_hor_value_slider_draw(HOR_VALUE_SLIDER s);
+extern "C" inline void hor_value_slider_set_handle_hook(HOR_VALUE_SLIDER s, void * h);
+extern "C" inline int fl_hor_value_slider_handle(HOR_VALUE_SLIDER s, int e);
-extern "C" HOR_VALUE_SLIDER new_fl_hor_value_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_hor_value_slider(HOR_VALUE_SLIDER s);
+extern "C" inline HOR_VALUE_SLIDER new_fl_hor_value_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_hor_value_slider(HOR_VALUE_SLIDER s);
#endif
diff --git a/src/c_fl_horizontal_slider.h b/src/c_fl_horizontal_slider.h
index 13ba6e2..18a0ed8 100644
--- a/src/c_fl_horizontal_slider.h
+++ b/src/c_fl_horizontal_slider.h
@@ -11,16 +11,16 @@ typedef void* HORIZONTAL_SLIDER;
-extern "C" void horizontal_slider_set_draw_hook(HORIZONTAL_SLIDER s, void * d);
-extern "C" void fl_horizontal_slider_draw(HORIZONTAL_SLIDER s);
-extern "C" void horizontal_slider_set_handle_hook(HORIZONTAL_SLIDER s, void * h);
-extern "C" int fl_horizontal_slider_handle(HORIZONTAL_SLIDER s, int e);
+extern "C" inline void horizontal_slider_set_draw_hook(HORIZONTAL_SLIDER s, void * d);
+extern "C" inline void fl_horizontal_slider_draw(HORIZONTAL_SLIDER s);
+extern "C" inline void horizontal_slider_set_handle_hook(HORIZONTAL_SLIDER s, void * h);
+extern "C" inline int fl_horizontal_slider_handle(HORIZONTAL_SLIDER s, int e);
-extern "C" HORIZONTAL_SLIDER new_fl_horizontal_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_horizontal_slider(HORIZONTAL_SLIDER s);
+extern "C" inline HORIZONTAL_SLIDER new_fl_horizontal_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_horizontal_slider(HORIZONTAL_SLIDER s);
#endif
diff --git a/src/c_fl_image.cpp b/src/c_fl_image.cpp
index f3daf7f..07b6d4d 100644
--- a/src/c_fl_image.cpp
+++ b/src/c_fl_image.cpp
@@ -8,6 +8,7 @@
class My_Image : public Fl_Image {
public:
+ using Fl_Image::Fl_Image;
friend void fl_image_draw_empty(IMAGE i, int x, int y);
};
@@ -15,16 +16,28 @@ class My_Image : public Fl_Image {
IMAGE new_fl_image(int w, int h, int d) {
- Fl_Image *i = new Fl_Image(w, h, d);
+ My_Image *i = new My_Image(w, h, d);
return i;
}
void free_fl_image(IMAGE i) {
- delete reinterpret_cast<Fl_Image*>(i);
+ delete reinterpret_cast<My_Image*>(i);
+}
+
+
+
+
+int fl_image_get_rgb_scaling() {
+ return Fl_Image::RGB_scaling();
+}
+
+void fl_image_set_rgb_scaling(int t) {
+ Fl_Image::RGB_scaling(static_cast<Fl_RGB_Scaling>(t));
}
IMAGE fl_image_copy(IMAGE i, int w, int h) {
- return reinterpret_cast<Fl_Image*>(i)->copy(w, h);
+ // virtual so disable dispatch
+ return reinterpret_cast<Fl_Image*>(i)->Fl_Image::copy(w, h);
}
IMAGE fl_image_copy2(IMAGE i) {
@@ -35,11 +48,13 @@ IMAGE fl_image_copy2(IMAGE i) {
void fl_image_color_average(IMAGE i, int c, float b) {
- reinterpret_cast<Fl_Image*>(i)->color_average(c, b);
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_Image*>(i)->Fl_Image::color_average(c, b);
}
void fl_image_desaturate(IMAGE i) {
- reinterpret_cast<Fl_Image*>(i)->desaturate();
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_Image*>(i)->Fl_Image::desaturate();
}
@@ -85,7 +100,8 @@ void fl_image_draw(IMAGE i, int x, int y) {
}
void fl_image_draw2(IMAGE i, int x, int y, int w, int h, int cx, int cy) {
- reinterpret_cast<Fl_Image*>(i)->draw(x, y, w, h, cx, cy);
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_Image*>(i)->Fl_Image::draw(x, y, w, h, cx, cy);
}
void fl_image_draw_empty(IMAGE i, int x, int y) {
diff --git a/src/c_fl_image.h b/src/c_fl_image.h
index b3fac75..efe7765 100644
--- a/src/c_fl_image.h
+++ b/src/c_fl_image.h
@@ -11,30 +11,34 @@ typedef void* IMAGE;
-extern "C" IMAGE new_fl_image(int w, int h, int d);
-extern "C" void free_fl_image(IMAGE i);
-extern "C" IMAGE fl_image_copy(IMAGE i, int w, int h);
-extern "C" IMAGE fl_image_copy2(IMAGE i);
+extern "C" inline IMAGE new_fl_image(int w, int h, int d);
+extern "C" inline void free_fl_image(IMAGE i);
+extern "C" inline int fl_image_get_rgb_scaling();
+extern "C" inline void fl_image_set_rgb_scaling(int t);
+extern "C" inline IMAGE fl_image_copy(IMAGE i, int w, int h);
+extern "C" inline IMAGE fl_image_copy2(IMAGE i);
-extern "C" void fl_image_color_average(IMAGE i, int c, float b);
-extern "C" void fl_image_desaturate(IMAGE i);
-extern "C" void fl_image_inactive(IMAGE i);
-extern "C" int fl_image_fail(IMAGE i);
+extern "C" inline void fl_image_color_average(IMAGE i, int c, float b);
+extern "C" inline void fl_image_desaturate(IMAGE i);
-extern "C" int fl_image_w(IMAGE i);
-extern "C" int fl_image_h(IMAGE i);
-extern "C" int fl_image_d(IMAGE i);
+extern "C" inline void fl_image_inactive(IMAGE i);
+extern "C" inline int fl_image_fail(IMAGE i);
-extern "C" void fl_image_draw(IMAGE i, int x, int y);
-extern "C" void fl_image_draw2(IMAGE i, int x, int y, int w, int h, int cx, int cy);
-extern "C" void fl_image_draw_empty(IMAGE i, int x, int y);
+extern "C" inline int fl_image_w(IMAGE i);
+extern "C" inline int fl_image_h(IMAGE i);
+extern "C" inline int fl_image_d(IMAGE i);
+
+
+extern "C" inline void fl_image_draw(IMAGE i, int x, int y);
+extern "C" inline void fl_image_draw2(IMAGE i, int x, int y, int w, int h, int cx, int cy);
+extern "C" inline void fl_image_draw_empty(IMAGE i, int x, int y);
#endif
diff --git a/src/c_fl_jpeg_image.h b/src/c_fl_jpeg_image.h
index c81bd6f..90389de 100644
--- a/src/c_fl_jpeg_image.h
+++ b/src/c_fl_jpeg_image.h
@@ -11,8 +11,8 @@ typedef void* JPEG_IMAGE;
-extern "C" JPEG_IMAGE new_fl_jpeg_image(const char * f);
-extern "C" void free_fl_jpeg_image(JPEG_IMAGE j);
+extern "C" inline JPEG_IMAGE new_fl_jpeg_image(const char * f);
+extern "C" inline void free_fl_jpeg_image(JPEG_IMAGE j);
#endif
diff --git a/src/c_fl_nice_slider.h b/src/c_fl_nice_slider.h
index d07b47e..4874923 100644
--- a/src/c_fl_nice_slider.h
+++ b/src/c_fl_nice_slider.h
@@ -11,16 +11,16 @@ typedef void* NICE_SLIDER;
-extern "C" void nice_slider_set_draw_hook(NICE_SLIDER s, void * d);
-extern "C" void fl_nice_slider_draw(NICE_SLIDER s);
-extern "C" void nice_slider_set_handle_hook(NICE_SLIDER s, void * h);
-extern "C" int fl_nice_slider_handle(NICE_SLIDER s, int e);
+extern "C" inline void nice_slider_set_draw_hook(NICE_SLIDER s, void * d);
+extern "C" inline void fl_nice_slider_draw(NICE_SLIDER s);
+extern "C" inline void nice_slider_set_handle_hook(NICE_SLIDER s, void * h);
+extern "C" inline int fl_nice_slider_handle(NICE_SLIDER s, int e);
-extern "C" NICE_SLIDER new_fl_nice_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_nice_slider(NICE_SLIDER s);
+extern "C" inline NICE_SLIDER new_fl_nice_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_nice_slider(NICE_SLIDER s);
#endif
diff --git a/src/c_fl_png_image.h b/src/c_fl_png_image.h
index b9901ea..a35cdfa 100644
--- a/src/c_fl_png_image.h
+++ b/src/c_fl_png_image.h
@@ -11,8 +11,8 @@ typedef void* PNG_IMAGE;
-extern "C" PNG_IMAGE new_fl_png_image(const char * f);
-extern "C" void free_fl_png_image(PNG_IMAGE p);
+extern "C" inline PNG_IMAGE new_fl_png_image(const char * f);
+extern "C" inline void free_fl_png_image(PNG_IMAGE p);
#endif
diff --git a/src/c_fl_pnm_image.h b/src/c_fl_pnm_image.h
index 558780c..e5031d8 100644
--- a/src/c_fl_pnm_image.h
+++ b/src/c_fl_pnm_image.h
@@ -11,8 +11,8 @@ typedef void* PNM_IMAGE;
-extern "C" PNM_IMAGE new_fl_pnm_image(const char * f);
-extern "C" void free_fl_pnm_image(PNM_IMAGE p);
+extern "C" inline PNM_IMAGE new_fl_pnm_image(const char * f);
+extern "C" inline void free_fl_pnm_image(PNM_IMAGE p);
#endif
diff --git a/src/c_fl_rgb_image.cpp b/src/c_fl_rgb_image.cpp
index e91eec2..3c0fec6 100644
--- a/src/c_fl_rgb_image.cpp
+++ b/src/c_fl_rgb_image.cpp
@@ -11,7 +11,8 @@ void free_fl_rgb_image(RGB_IMAGE i) {
}
RGB_IMAGE fl_rgb_image_copy(RGB_IMAGE i, int w, int h) {
- return reinterpret_cast<Fl_RGB_Image*>(i)->copy(w, h);
+ // virtual so disable dispatch
+ return reinterpret_cast<Fl_RGB_Image*>(i)->Fl_RGB_Image::copy(w, h);
}
RGB_IMAGE fl_rgb_image_copy2(RGB_IMAGE i) {
@@ -22,18 +23,25 @@ RGB_IMAGE fl_rgb_image_copy2(RGB_IMAGE i) {
void fl_rgb_image_color_average(RGB_IMAGE i, int c, float b) {
- reinterpret_cast<Fl_RGB_Image*>(i)->color_average(c, b);
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_RGB_Image*>(i)->Fl_RGB_Image::color_average(c, b);
}
void fl_rgb_image_desaturate(RGB_IMAGE i) {
- reinterpret_cast<Fl_RGB_Image*>(i)->desaturate();
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_RGB_Image*>(i)->Fl_RGB_Image::desaturate();
}
+void fl_rgb_image_draw2(RGB_IMAGE i, int x, int y) {
+ reinterpret_cast<Fl_RGB_Image*>(i)->draw(x, y);
+}
+
void fl_rgb_image_draw(RGB_IMAGE i, int x, int y, int w, int h, int cx, int cy) {
- reinterpret_cast<Fl_RGB_Image*>(i)->draw(x, y, w, h, cx, cy);
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_RGB_Image*>(i)->Fl_RGB_Image::draw(x, y, w, h, cx, cy);
}
diff --git a/src/c_fl_rgb_image.h b/src/c_fl_rgb_image.h
index d64f0a2..4354541 100644
--- a/src/c_fl_rgb_image.h
+++ b/src/c_fl_rgb_image.h
@@ -11,18 +11,19 @@ typedef void* RGB_IMAGE;
-extern "C" void free_fl_rgb_image(RGB_IMAGE i);
-extern "C" RGB_IMAGE fl_rgb_image_copy(RGB_IMAGE i, int w, int h);
-extern "C" RGB_IMAGE fl_rgb_image_copy2(RGB_IMAGE i);
+extern "C" inline void free_fl_rgb_image(RGB_IMAGE i);
+extern "C" inline RGB_IMAGE fl_rgb_image_copy(RGB_IMAGE i, int w, int h);
+extern "C" inline RGB_IMAGE fl_rgb_image_copy2(RGB_IMAGE i);
-extern "C" void fl_rgb_image_color_average(RGB_IMAGE i, int c, float b);
-extern "C" void fl_rgb_image_desaturate(RGB_IMAGE i);
+extern "C" inline void fl_rgb_image_color_average(RGB_IMAGE i, int c, float b);
+extern "C" inline void fl_rgb_image_desaturate(RGB_IMAGE i);
-extern "C" void fl_rgb_image_draw(RGB_IMAGE i, int x, int y, int w, int h, int cx, int cy);
+extern "C" inline void fl_rgb_image_draw2(RGB_IMAGE i, int x, int y);
+extern "C" inline void fl_rgb_image_draw(RGB_IMAGE i, int x, int y, int w, int h, int cx, int cy);
#endif
diff --git a/src/c_fl_scrollbar.cpp b/src/c_fl_scrollbar.cpp
index c94240b..0301f43 100644
--- a/src/c_fl_scrollbar.cpp
+++ b/src/c_fl_scrollbar.cpp
@@ -71,22 +71,22 @@ void free_fl_scrollbar(SCROLLBAR s) {
int fl_scrollbar_get_linesize(SCROLLBAR s) {
- return reinterpret_cast<My_Scrollbar*>(s)->linesize();
+ return reinterpret_cast<Fl_Scrollbar*>(s)->linesize();
}
void fl_scrollbar_set_linesize(SCROLLBAR s, int t) {
- reinterpret_cast<My_Scrollbar*>(s)->linesize(t);
+ reinterpret_cast<Fl_Scrollbar*>(s)->linesize(t);
}
int fl_scrollbar_get_value(SCROLLBAR s) {
- return reinterpret_cast<My_Scrollbar*>(s)->value();
+ return reinterpret_cast<Fl_Scrollbar*>(s)->value();
}
void fl_scrollbar_set_value(SCROLLBAR s, int t) {
- reinterpret_cast<My_Scrollbar*>(s)->value(t);
+ reinterpret_cast<Fl_Scrollbar*>(s)->value(t);
}
void fl_scrollbar_set_value2(SCROLLBAR s, int p, int w, int f, int t) {
- reinterpret_cast<My_Scrollbar*>(s)->value(p,w,f,t);
+ reinterpret_cast<Fl_Scrollbar*>(s)->value(p,w,f,t);
}
diff --git a/src/c_fl_scrollbar.h b/src/c_fl_scrollbar.h
index 311abfa..90311ac 100644
--- a/src/c_fl_scrollbar.h
+++ b/src/c_fl_scrollbar.h
@@ -11,25 +11,25 @@ typedef void* SCROLLBAR;
-extern "C" void scrollbar_set_draw_hook(SCROLLBAR s, void * d);
-extern "C" void fl_scrollbar_draw(SCROLLBAR s);
-extern "C" void scrollbar_set_handle_hook(SCROLLBAR s, void * h);
-extern "C" int fl_scrollbar_handle(SCROLLBAR s, int e);
+extern "C" inline void scrollbar_set_draw_hook(SCROLLBAR s, void * d);
+extern "C" inline void fl_scrollbar_draw(SCROLLBAR s);
+extern "C" inline void scrollbar_set_handle_hook(SCROLLBAR s, void * h);
+extern "C" inline int fl_scrollbar_handle(SCROLLBAR s, int e);
-extern "C" SCROLLBAR new_fl_scrollbar(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_scrollbar(SCROLLBAR s);
+extern "C" inline SCROLLBAR new_fl_scrollbar(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_scrollbar(SCROLLBAR s);
-extern "C" int fl_scrollbar_get_linesize(SCROLLBAR s);
-extern "C" void fl_scrollbar_set_linesize(SCROLLBAR s, int t);
-extern "C" int fl_scrollbar_get_value(SCROLLBAR s);
-extern "C" void fl_scrollbar_set_value(SCROLLBAR s, int t);
-extern "C" void fl_scrollbar_set_value2(SCROLLBAR s, int p, int w, int f, int t);
+extern "C" inline int fl_scrollbar_get_linesize(SCROLLBAR s);
+extern "C" inline void fl_scrollbar_set_linesize(SCROLLBAR s, int t);
+extern "C" inline int fl_scrollbar_get_value(SCROLLBAR s);
+extern "C" inline void fl_scrollbar_set_value(SCROLLBAR s, int t);
+extern "C" inline void fl_scrollbar_set_value2(SCROLLBAR s, int p, int w, int f, int t);
#endif
diff --git a/src/c_fl_shared_image.cpp b/src/c_fl_shared_image.cpp
index c31b12f..a7d7bf9 100644
--- a/src/c_fl_shared_image.cpp
+++ b/src/c_fl_shared_image.cpp
@@ -12,7 +12,7 @@ SHARED_IMAGE fl_shared_image_get(const char * f, int w, int h) {
}
SHARED_IMAGE fl_shared_image_get2(void * r) {
- return Fl_Shared_Image::get(reinterpret_cast<Fl_RGB_Image*>(r));
+ return Fl_Shared_Image::get(reinterpret_cast<Fl_RGB_Image*>(r), 0);
}
SHARED_IMAGE fl_shared_image_find(const char * n, int w, int h) {
@@ -24,7 +24,8 @@ void release_fl_shared_image(SHARED_IMAGE i) {
}
SHARED_IMAGE fl_shared_image_copy(SHARED_IMAGE i, int w, int h) {
- return reinterpret_cast<Fl_Shared_Image*>(i)->copy(w, h);
+ // virtual so disable dispatch
+ return reinterpret_cast<Fl_Shared_Image*>(i)->Fl_Shared_Image::copy(w, h);
}
SHARED_IMAGE fl_shared_image_copy2(SHARED_IMAGE i) {
@@ -35,11 +36,13 @@ SHARED_IMAGE fl_shared_image_copy2(SHARED_IMAGE i) {
void fl_shared_image_color_average(SHARED_IMAGE i, int c, float b) {
- reinterpret_cast<Fl_Shared_Image*>(i)->color_average(c, b);
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_Shared_Image*>(i)->Fl_Shared_Image::color_average(c, b);
}
void fl_shared_image_desaturate(SHARED_IMAGE i) {
- reinterpret_cast<Fl_Shared_Image*>(i)->desaturate();
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_Shared_Image*>(i)->Fl_Shared_Image::desaturate();
}
@@ -53,10 +56,6 @@ void fl_shared_image_reload(SHARED_IMAGE i) {
reinterpret_cast<Fl_Shared_Image*>(i)->reload();
}
-void fl_shared_image_uncache(SHARED_IMAGE i) {
- reinterpret_cast<Fl_Shared_Image*>(i)->uncache();
-}
-
@@ -72,7 +71,8 @@ void fl_shared_image_scale(SHARED_IMAGE i, int w, int h, int p, int e) {
void fl_shared_image_draw(SHARED_IMAGE i, int x, int y, int w, int h, int cx, int cy) {
- reinterpret_cast<Fl_Shared_Image*>(i)->draw(x, y, w, h, cx, cy);
+ // virtual so disable dispatch
+ reinterpret_cast<Fl_Shared_Image*>(i)->Fl_Shared_Image::draw(x, y, w, h, cx, cy);
}
void fl_shared_image_draw2(SHARED_IMAGE i, int x, int y) {
diff --git a/src/c_fl_shared_image.h b/src/c_fl_shared_image.h
index 6c6abdf..2924b62 100644
--- a/src/c_fl_shared_image.h
+++ b/src/c_fl_shared_image.h
@@ -11,31 +11,30 @@ typedef void* SHARED_IMAGE;
-extern "C" SHARED_IMAGE fl_shared_image_get(const char * f, int w, int h);
-extern "C" SHARED_IMAGE fl_shared_image_get2(void * r);
-extern "C" SHARED_IMAGE fl_shared_image_find(const char * n, int w, int h);
-extern "C" void release_fl_shared_image(SHARED_IMAGE i);
-extern "C" SHARED_IMAGE fl_shared_image_copy(SHARED_IMAGE i, int w, int h);
-extern "C" SHARED_IMAGE fl_shared_image_copy2(SHARED_IMAGE i);
+extern "C" inline SHARED_IMAGE fl_shared_image_get(const char * f, int w, int h);
+extern "C" inline SHARED_IMAGE fl_shared_image_get2(void * r);
+extern "C" inline SHARED_IMAGE fl_shared_image_find(const char * n, int w, int h);
+extern "C" inline void release_fl_shared_image(SHARED_IMAGE i);
+extern "C" inline SHARED_IMAGE fl_shared_image_copy(SHARED_IMAGE i, int w, int h);
+extern "C" inline SHARED_IMAGE fl_shared_image_copy2(SHARED_IMAGE i);
-extern "C" void fl_shared_image_color_average(SHARED_IMAGE i, int c, float b);
-extern "C" void fl_shared_image_desaturate(SHARED_IMAGE i);
+extern "C" inline void fl_shared_image_color_average(SHARED_IMAGE i, int c, float b);
+extern "C" inline void fl_shared_image_desaturate(SHARED_IMAGE i);
-extern "C" const char * fl_shared_image_name(SHARED_IMAGE i);
-extern "C" void fl_shared_image_reload(SHARED_IMAGE i);
-extern "C" void fl_shared_image_uncache(SHARED_IMAGE i);
+extern "C" inline const char * fl_shared_image_name(SHARED_IMAGE i);
+extern "C" inline void fl_shared_image_reload(SHARED_IMAGE i);
-extern "C" void fl_shared_image_scaling_algorithm(int v);
-extern "C" void fl_shared_image_scale(SHARED_IMAGE i, int w, int h, int p, int e);
+extern "C" inline void fl_shared_image_scaling_algorithm(int v);
+extern "C" inline void fl_shared_image_scale(SHARED_IMAGE i, int w, int h, int p, int e);
-extern "C" void fl_shared_image_draw(SHARED_IMAGE i, int x, int y, int w, int h, int cx, int cy);
-extern "C" void fl_shared_image_draw2(SHARED_IMAGE i, int x, int y);
+extern "C" inline void fl_shared_image_draw(SHARED_IMAGE i, int x, int y, int w, int h, int cx, int cy);
+extern "C" inline void fl_shared_image_draw2(SHARED_IMAGE i, int x, int y);
#endif
diff --git a/src/c_fl_slider.cpp b/src/c_fl_slider.cpp
index fe30e2b..48b007f 100644
--- a/src/c_fl_slider.cpp
+++ b/src/c_fl_slider.cpp
@@ -70,6 +70,17 @@ void free_fl_slider(SLIDER s) {
+int fl_slider_get_type(SLIDER s) {
+ return reinterpret_cast<Fl_Slider*>(s)->type();
+}
+
+void fl_slider_set_type(SLIDER s, int t) {
+ reinterpret_cast<Fl_Slider*>(s)->type(t);
+}
+
+
+
+
void fl_slider_set_bounds(SLIDER s, double a, double b) {
reinterpret_cast<Fl_Slider*>(s)->bounds(a,b);
}
diff --git a/src/c_fl_slider.h b/src/c_fl_slider.h
index c06f209..4adae2a 100644
--- a/src/c_fl_slider.h
+++ b/src/c_fl_slider.h
@@ -11,26 +11,30 @@ typedef void* SLIDER;
-extern "C" void slider_set_draw_hook(SLIDER s, void * d);
-extern "C" void fl_slider_draw(SLIDER s);
-extern "C" void slider_set_handle_hook(SLIDER s, void * h);
-extern "C" int fl_slider_handle(SLIDER s, int e);
+extern "C" inline void slider_set_draw_hook(SLIDER s, void * d);
+extern "C" inline void fl_slider_draw(SLIDER s);
+extern "C" inline void slider_set_handle_hook(SLIDER s, void * h);
+extern "C" inline int fl_slider_handle(SLIDER s, int e);
-extern "C" SLIDER new_fl_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_slider(SLIDER s);
+extern "C" inline SLIDER new_fl_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_slider(SLIDER s);
-extern "C" void fl_slider_set_bounds(SLIDER s, double a, double b);
-extern "C" int fl_slider_get_slider(SLIDER s);
-extern "C" void fl_slider_set_slider(SLIDER s, int t);
-extern "C" float fl_slider_get_slider_size(SLIDER s);
-extern "C" void fl_slider_set_slider_size(SLIDER s, float t);
-extern "C" int fl_slider_scrollvalue(SLIDER s, int p, int z, int f, int t);
+extern "C" inline int fl_slider_get_type(SLIDER s);
+extern "C" inline void fl_slider_set_type(SLIDER s, int t);
+
+
+extern "C" inline void fl_slider_set_bounds(SLIDER s, double a, double b);
+extern "C" inline int fl_slider_get_slider(SLIDER s);
+extern "C" inline void fl_slider_set_slider(SLIDER s, int t);
+extern "C" inline float fl_slider_get_slider_size(SLIDER s);
+extern "C" inline void fl_slider_set_slider_size(SLIDER s, float t);
+extern "C" inline int fl_slider_scrollvalue(SLIDER s, int p, int z, int f, int t);
#endif
diff --git a/src/c_fl_value_slider.cpp b/src/c_fl_value_slider.cpp
index 757424c..aa819af 100644
--- a/src/c_fl_value_slider.cpp
+++ b/src/c_fl_value_slider.cpp
@@ -71,26 +71,26 @@ void free_fl_value_slider(VALUE_SLIDER s) {
unsigned int fl_value_slider_get_textcolor(VALUE_SLIDER s) {
- return reinterpret_cast<My_Value_Slider*>(s)->textcolor();
+ return reinterpret_cast<Fl_Value_Slider*>(s)->textcolor();
}
void fl_value_slider_set_textcolor(VALUE_SLIDER s, unsigned int t) {
- reinterpret_cast<My_Value_Slider*>(s)->textcolor(t);
+ reinterpret_cast<Fl_Value_Slider*>(s)->textcolor(t);
}
int fl_value_slider_get_textfont(VALUE_SLIDER s) {
- return reinterpret_cast<My_Value_Slider*>(s)->textfont();
+ return reinterpret_cast<Fl_Value_Slider*>(s)->textfont();
}
void fl_value_slider_set_textfont(VALUE_SLIDER s, int t) {
- reinterpret_cast<My_Value_Slider*>(s)->textfont(t);
+ reinterpret_cast<Fl_Value_Slider*>(s)->textfont(t);
}
int fl_value_slider_get_textsize(VALUE_SLIDER s) {
- return reinterpret_cast<My_Value_Slider*>(s)->textsize();
+ return reinterpret_cast<Fl_Value_Slider*>(s)->textsize();
}
void fl_value_slider_set_textsize(VALUE_SLIDER s, int t) {
- reinterpret_cast<My_Value_Slider*>(s)->textsize(t);
+ reinterpret_cast<Fl_Value_Slider*>(s)->textsize(t);
}
diff --git a/src/c_fl_value_slider.h b/src/c_fl_value_slider.h
index 9229fe6..1dba93a 100644
--- a/src/c_fl_value_slider.h
+++ b/src/c_fl_value_slider.h
@@ -11,26 +11,26 @@ typedef void* VALUE_SLIDER;
-extern "C" void value_slider_set_draw_hook(VALUE_SLIDER s, void * d);
-extern "C" void fl_value_slider_draw(VALUE_SLIDER s);
-extern "C" void value_slider_set_handle_hook(VALUE_SLIDER s, void * h);
-extern "C" int fl_value_slider_handle(VALUE_SLIDER s, int e);
+extern "C" inline void value_slider_set_draw_hook(VALUE_SLIDER s, void * d);
+extern "C" inline void fl_value_slider_draw(VALUE_SLIDER s);
+extern "C" inline void value_slider_set_handle_hook(VALUE_SLIDER s, void * h);
+extern "C" inline int fl_value_slider_handle(VALUE_SLIDER s, int e);
-extern "C" VALUE_SLIDER new_fl_value_slider(int x, int y, int w, int h, char* label);
-extern "C" void free_fl_value_slider(VALUE_SLIDER s);
+extern "C" inline VALUE_SLIDER new_fl_value_slider(int x, int y, int w, int h, char* label);
+extern "C" inline void free_fl_value_slider(VALUE_SLIDER s);
-extern "C" unsigned int fl_value_slider_get_textcolor(VALUE_SLIDER s);
-extern "C" void fl_value_slider_set_textcolor(VALUE_SLIDER s, unsigned int t);
-extern "C" int fl_value_slider_get_textfont(VALUE_SLIDER s);
-extern "C" void fl_value_slider_set_textfont(VALUE_SLIDER s, int t);
-extern "C" int fl_value_slider_get_textsize(VALUE_SLIDER s);
-extern "C" void fl_value_slider_set_textsize(VALUE_SLIDER s, int t);
+extern "C" inline unsigned int fl_value_slider_get_textcolor(VALUE_SLIDER s);
+extern "C" inline void fl_value_slider_set_textcolor(VALUE_SLIDER s, unsigned int t);
+extern "C" inline int fl_value_slider_get_textfont(VALUE_SLIDER s);
+extern "C" inline void fl_value_slider_set_textfont(VALUE_SLIDER s, int t);
+extern "C" inline int fl_value_slider_get_textsize(VALUE_SLIDER s);
+extern "C" inline void fl_value_slider_set_textsize(VALUE_SLIDER s, int t);
#endif
diff --git a/src/c_fl_xbm_image.h b/src/c_fl_xbm_image.h
index 9b0c967..33a78e1 100644
--- a/src/c_fl_xbm_image.h
+++ b/src/c_fl_xbm_image.h
@@ -11,8 +11,8 @@ typedef void* XBM_IMAGE;
-extern "C" XBM_IMAGE new_fl_xbm_image(const char * f);
-extern "C" void free_fl_xbm_image(XBM_IMAGE b);
+extern "C" inline XBM_IMAGE new_fl_xbm_image(const char * f);
+extern "C" inline void free_fl_xbm_image(XBM_IMAGE b);
#endif
diff --git a/src/fltk-images-bitmaps-xbm.adb b/src/fltk-images-bitmaps-xbm.adb
index 13cc5dd..1ab0904 100644
--- a/src/fltk-images-bitmaps-xbm.adb
+++ b/src/fltk-images-bitmaps-xbm.adb
@@ -17,10 +17,12 @@ package body FLTK.Images.Bitmaps.XBM is
(F : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_xbm_image, "new_fl_xbm_image");
+ pragma Inline (new_fl_xbm_image);
procedure free_fl_xbm_image
(P : in System.Address);
pragma Import (C, free_fl_xbm_image, "free_fl_xbm_image");
+ pragma Inline (free_fl_xbm_image);
diff --git a/src/fltk-images-bitmaps-xbm.ads b/src/fltk-images-bitmaps-xbm.ads
index 986a192..a242538 100644
--- a/src/fltk-images-bitmaps-xbm.ads
+++ b/src/fltk-images-bitmaps-xbm.ads
@@ -5,6 +5,9 @@ package FLTK.Images.Bitmaps.XBM is
type XBM_Image is new Bitmap with private;
+ type XBM_Image_Reference (Data : not null access XBM_Image'Class) is limited null record
+ with Implicit_Dereference => Data;
+
diff --git a/src/fltk-images-bitmaps.adb b/src/fltk-images-bitmaps.adb
index 7fb1a51..ac4bf1e 100644
--- a/src/fltk-images-bitmaps.adb
+++ b/src/fltk-images-bitmaps.adb
@@ -16,25 +16,35 @@ package body FLTK.Images.Bitmaps is
procedure free_fl_bitmap
(I : in System.Address);
pragma Import (C, free_fl_bitmap, "free_fl_bitmap");
+ pragma Inline (free_fl_bitmap);
function fl_bitmap_copy
(I : in System.Address;
W, H : in Interfaces.C.int)
return System.Address;
pragma Import (C, fl_bitmap_copy, "fl_bitmap_copy");
+ pragma Inline (fl_bitmap_copy);
function fl_bitmap_copy2
(I : in System.Address)
return System.Address;
pragma Import (C, fl_bitmap_copy2, "fl_bitmap_copy2");
+ pragma Inline (fl_bitmap_copy2);
+ procedure fl_bitmap_draw2
+ (I : in System.Address;
+ X, Y : in Interfaces.C.int);
+ pragma Import (C, fl_bitmap_draw2, "fl_bitmap_draw2");
+ pragma Inline (fl_bitmap_draw2);
+
procedure fl_bitmap_draw
(I : in System.Address;
X, Y, W, H, CX, CY : in Interfaces.C.int);
pragma Import (C, fl_bitmap_draw, "fl_bitmap_draw");
+ pragma Inline (fl_bitmap_draw);
@@ -81,6 +91,17 @@ package body FLTK.Images.Bitmaps is
procedure Draw
+ (This : in Bitmap;
+ X, Y : in Integer) is
+ begin
+ fl_bitmap_draw2
+ (This.Void_Ptr,
+ Interfaces.C.int (X),
+ Interfaces.C.int (Y));
+ end Draw;
+
+
+ procedure Draw
(This : in Bitmap;
X, Y, W, H : in Integer;
CX, CY : in Integer := 0) is
diff --git a/src/fltk-images-bitmaps.ads b/src/fltk-images-bitmaps.ads
index 53229e2..14df718 100644
--- a/src/fltk-images-bitmaps.ads
+++ b/src/fltk-images-bitmaps.ads
@@ -5,6 +5,9 @@ package FLTK.Images.Bitmaps is
type Bitmap is new Image with private;
+ type Bitmap_Reference (Data : not null access Bitmap'Class) is limited null record
+ with Implicit_Dereference => Data;
+
@@ -21,6 +24,10 @@ package FLTK.Images.Bitmaps is
procedure Draw
+ (This : in Bitmap;
+ X, Y : in Integer);
+
+ procedure Draw
(This : in Bitmap;
X, Y, W, H : in Integer;
CX, CY : in Integer := 0);
@@ -35,5 +42,11 @@ private
(This : in out Bitmap);
+
+
+ pragma Inline (Copy);
+ pragma Inline (Draw);
+
+
end FLTK.Images.Bitmaps;
diff --git a/src/fltk-images-rgb-bmp.adb b/src/fltk-images-rgb-bmp.adb
index 7556234..31162f9 100644
--- a/src/fltk-images-rgb-bmp.adb
+++ b/src/fltk-images-rgb-bmp.adb
@@ -17,10 +17,12 @@ package body FLTK.Images.RGB.BMP is
(F : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_bmp_image, "new_fl_bmp_image");
+ pragma Inline (new_fl_bmp_image);
procedure free_fl_bmp_image
(P : in System.Address);
pragma Import (C, free_fl_bmp_image, "free_fl_bmp_image");
+ pragma Inline (free_fl_bmp_image);
diff --git a/src/fltk-images-rgb-bmp.ads b/src/fltk-images-rgb-bmp.ads
index eed47e1..bb4fa48 100644
--- a/src/fltk-images-rgb-bmp.ads
+++ b/src/fltk-images-rgb-bmp.ads
@@ -5,6 +5,9 @@ package FLTK.Images.RGB.BMP is
type BMP_Image is new RGB_Image with private;
+ type BMP_Image_Reference (Data : not null access BMP_Image'Class) is limited null record
+ with Implicit_Dereference => Data;
+
diff --git a/src/fltk-images-rgb-jpeg.adb b/src/fltk-images-rgb-jpeg.adb
index d37eb3d..9448570 100644
--- a/src/fltk-images-rgb-jpeg.adb
+++ b/src/fltk-images-rgb-jpeg.adb
@@ -17,10 +17,12 @@ package body FLTK.Images.RGB.JPEG is
(F : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_jpeg_image, "new_fl_jpeg_image");
+ pragma Inline (new_fl_jpeg_image);
procedure free_fl_jpeg_image
(P : in System.Address);
pragma Import (C, free_fl_jpeg_image, "free_fl_jpeg_image");
+ pragma Inline (free_fl_jpeg_image);
diff --git a/src/fltk-images-rgb-jpeg.ads b/src/fltk-images-rgb-jpeg.ads
index a443f2b..c7fafd8 100644
--- a/src/fltk-images-rgb-jpeg.ads
+++ b/src/fltk-images-rgb-jpeg.ads
@@ -5,6 +5,9 @@ package FLTK.Images.RGB.JPEG is
type JPEG_Image is new RGB_Image with private;
+ type JPEG_Image_Reference (Data : not null access JPEG_Image'Class) is
+ limited null record with Implicit_Dereference => Data;
+
diff --git a/src/fltk-images-rgb-png.adb b/src/fltk-images-rgb-png.adb
index 9a541a8..8cb97ce 100644
--- a/src/fltk-images-rgb-png.adb
+++ b/src/fltk-images-rgb-png.adb
@@ -17,10 +17,12 @@ package body FLTK.Images.RGB.PNG is
(F : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_png_image, "new_fl_png_image");
+ pragma Inline (new_fl_png_image);
procedure free_fl_png_image
(P : in System.Address);
pragma Import (C, free_fl_png_image, "free_fl_png_image");
+ pragma Inline (free_fl_png_image);
diff --git a/src/fltk-images-rgb-png.ads b/src/fltk-images-rgb-png.ads
index fbcb69b..760f84d 100644
--- a/src/fltk-images-rgb-png.ads
+++ b/src/fltk-images-rgb-png.ads
@@ -5,6 +5,9 @@ package FLTK.Images.RGB.PNG is
type PNG_Image is new RGB_Image with private;
+ type PNG_Image_Reference (Data : not null access PNG_Image'Class) is limited null record
+ with Implicit_Dereference => Data;
+
diff --git a/src/fltk-images-rgb-pnm.adb b/src/fltk-images-rgb-pnm.adb
index 51cf026..95247a1 100644
--- a/src/fltk-images-rgb-pnm.adb
+++ b/src/fltk-images-rgb-pnm.adb
@@ -17,10 +17,12 @@ package body FLTK.Images.RGB.PNM is
(F : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_pnm_image, "new_fl_pnm_image");
+ pragma Inline (new_fl_pnm_image);
procedure free_fl_pnm_image
(P : in System.Address);
pragma Import (C, free_fl_pnm_image, "free_fl_pnm_image");
+ pragma Inline (free_fl_pnm_image);
diff --git a/src/fltk-images-rgb-pnm.ads b/src/fltk-images-rgb-pnm.ads
index f766f84..92743ea 100644
--- a/src/fltk-images-rgb-pnm.ads
+++ b/src/fltk-images-rgb-pnm.ads
@@ -5,6 +5,9 @@ package FLTK.Images.RGB.PNM is
type PNM_Image is new RGB_Image with private;
+ type PNM_Image_Reference (Data : not null access PNM_Image'Class) is limited null record
+ with Implicit_Dereference => Data;
+
diff --git a/src/fltk-images-rgb.adb b/src/fltk-images-rgb.adb
index 3bcd01e..8e3e36f 100644
--- a/src/fltk-images-rgb.adb
+++ b/src/fltk-images-rgb.adb
@@ -16,17 +16,20 @@ package body FLTK.Images.RGB is
procedure free_fl_rgb_image
(I : in System.Address);
pragma Import (C, free_fl_rgb_image, "free_fl_rgb_image");
+ pragma Inline (free_fl_rgb_image);
function fl_rgb_image_copy
(I : in System.Address;
W, H : in Interfaces.C.int)
return System.Address;
pragma Import (C, fl_rgb_image_copy, "fl_rgb_image_copy");
+ pragma Inline (fl_rgb_image_copy);
function fl_rgb_image_copy2
(I : in System.Address)
return System.Address;
pragma Import (C, fl_rgb_image_copy2, "fl_rgb_image_copy2");
+ pragma Inline (fl_rgb_image_copy2);
@@ -36,18 +39,27 @@ package body FLTK.Images.RGB is
C : in Interfaces.C.int;
B : in Interfaces.C.C_float);
pragma Import (C, fl_rgb_image_color_average, "fl_rgb_image_color_average");
+ pragma Inline (fl_rgb_image_color_average);
procedure fl_rgb_image_desaturate
(I : in System.Address);
pragma Import (C, fl_rgb_image_desaturate, "fl_rgb_image_desaturate");
+ pragma Inline (fl_rgb_image_desaturate);
+ procedure fl_rgb_image_draw2
+ (I : in System.Address;
+ X, Y : in Interfaces.C.int);
+ pragma Import (C, fl_rgb_image_draw2, "fl_rgb_image_draw2");
+ pragma Inline (fl_rgb_image_draw2);
+
procedure fl_rgb_image_draw
(I : in System.Address;
X, Y, W, H, CX, CY : in Interfaces.C.int);
pragma Import (C, fl_rgb_image_draw, "fl_rgb_image_draw");
+ pragma Inline (fl_rgb_image_draw);
@@ -115,6 +127,17 @@ package body FLTK.Images.RGB is
procedure Draw
+ (This : in RGB_Image;
+ X, Y : in Integer) is
+ begin
+ fl_rgb_image_draw2
+ (This.Void_Ptr,
+ Interfaces.C.int (X),
+ Interfaces.C.int (Y));
+ end Draw;
+
+
+ procedure Draw
(This : in RGB_Image;
X, Y, W, H : in Integer;
CX, CY : in Integer := 0) is
diff --git a/src/fltk-images-rgb.ads b/src/fltk-images-rgb.ads
index c807468..3aa3de0 100644
--- a/src/fltk-images-rgb.ads
+++ b/src/fltk-images-rgb.ads
@@ -5,6 +5,9 @@ package FLTK.Images.RGB is
type RGB_Image is new Image with private;
+ type RGB_Image_Reference (Data : not null access RGB_Image'Class) is limited null record
+ with Implicit_Dereference => Data;
+
@@ -32,6 +35,10 @@ package FLTK.Images.RGB is
procedure Draw
+ (This : in RGB_Image;
+ X, Y : in Integer);
+
+ procedure Draw
(This : in RGB_Image;
X, Y, W, H : in Integer;
CX, CY : in Integer := 0);
@@ -46,5 +53,17 @@ private
(This : in out RGB_Image);
+
+
+ pragma Inline (Copy);
+
+
+ pragma Inline (Color_Average);
+ pragma Inline (Desaturate);
+
+
+ pragma Inline (Draw);
+
+
end FLTK.Images.RGB;
diff --git a/src/fltk-images-shared.adb b/src/fltk-images-shared.adb
index e5bd240..0e36e6e 100644
--- a/src/fltk-images-shared.adb
+++ b/src/fltk-images-shared.adb
@@ -18,32 +18,38 @@ package body FLTK.Images.Shared is
W, H : in Interfaces.C.int)
return System.Address;
pragma Import (C, fl_shared_image_get, "fl_shared_image_get");
+ pragma Inline (fl_shared_image_get);
function fl_shared_image_get2
(I : in System.Address)
return System.Address;
pragma Import (C, fl_shared_image_get2, "fl_shared_image_get2");
+ pragma Inline (fl_shared_image_get2);
function fl_shared_image_find
(N : in Interfaces.C.char_array;
W, H : in Interfaces.C.int)
return System.Address;
pragma Import (C, fl_shared_image_find, "fl_shared_image_find");
+ pragma Inline (fl_shared_image_find);
procedure fl_shared_image_release
(I : in System.Address);
pragma Import (C, fl_shared_image_release, "fl_shared_image_release");
+ pragma Inline (fl_shared_image_release);
function fl_shared_image_copy
(I : in System.Address;
W, H : in Interfaces.C.int)
return System.Address;
pragma Import (C, fl_shared_image_copy, "fl_shared_image_copy");
+ pragma Inline (fl_shared_image_copy);
function fl_shared_image_copy2
(I : in System.Address)
return System.Address;
pragma Import (C, fl_shared_image_copy2, "fl_shared_image_copy2");
+ pragma Inline (fl_shared_image_copy2);
@@ -53,10 +59,12 @@ package body FLTK.Images.Shared is
C : in Interfaces.C.int;
B : in Interfaces.C.C_float);
pragma Import (C, fl_shared_image_color_average, "fl_shared_image_color_average");
+ pragma Inline (fl_shared_image_color_average);
procedure fl_shared_image_desaturate
(I : in System.Address);
pragma Import (C, fl_shared_image_desaturate, "fl_shared_image_desaturate");
+ pragma Inline (fl_shared_image_desaturate);
@@ -65,14 +73,12 @@ package body FLTK.Images.Shared is
(I : in System.Address)
return Interfaces.C.Strings.chars_ptr;
pragma Import (C, fl_shared_image_name, "fl_shared_image_name");
+ pragma Inline (fl_shared_image_name);
procedure fl_shared_image_reload
(I : in System.Address);
pragma Import (C, fl_shared_image_reload, "fl_shared_image_reload");
-
- procedure fl_shared_image_uncache
- (I : in System.Address);
- pragma Import (C, fl_shared_image_uncache, "fl_shared_image_uncache");
+ pragma Inline (fl_shared_image_reload);
@@ -80,11 +86,13 @@ package body FLTK.Images.Shared is
procedure fl_shared_image_scaling_algorithm
(A : in Interfaces.C.int);
pragma Import (C, fl_shared_image_scaling_algorithm, "fl_shared_image_scaling_algorithm");
+ pragma Inline (fl_shared_image_scaling_algorithm);
procedure fl_shared_image_scale
(I : in System.Address;
W, H, P, E : in Interfaces.C.int);
pragma Import (C, fl_shared_image_scale, "fl_shared_image_scale");
+ pragma Inline (fl_shared_image_scale);
@@ -93,11 +101,13 @@ package body FLTK.Images.Shared is
(I : in System.Address;
X, Y, W, H, CX, CY : in Interfaces.C.int);
pragma Import (C, fl_shared_image_draw, "fl_shared_image_draw");
+ pragma Inline (fl_shared_image_draw);
procedure fl_shared_image_draw2
(I : in System.Address;
X, Y : in Interfaces.C.int);
pragma Import (C, fl_shared_image_draw2, "fl_shared_image_draw2");
+ pragma Inline (fl_shared_image_draw2);
@@ -226,13 +236,6 @@ package body FLTK.Images.Shared is
end Reload;
- procedure Uncache
- (This : in out Shared_Image) is
- begin
- fl_shared_image_uncache (This.Void_Ptr);
- end Uncache;
-
-
procedure Set_Scaling_Algorithm
diff --git a/src/fltk-images-shared.ads b/src/fltk-images-shared.ads
index 9214c8d..a6810f8 100644
--- a/src/fltk-images-shared.ads
+++ b/src/fltk-images-shared.ads
@@ -10,7 +10,8 @@ package FLTK.Images.Shared is
type Shared_Image is new Image with private;
- type Scaling_Kind is (Nearest, Bilinear);
+ type Shared_Image_Reference (Data : not null access Shared_Image'Class) is
+ limited null record with Implicit_Dereference => Data;
@@ -66,9 +67,6 @@ package FLTK.Images.Shared is
procedure Reload
(This : in out Shared_Image);
- procedure Uncache
- (This : in out Shared_Image);
-
@@ -103,5 +101,25 @@ private
(This : in out Shared_Image);
+
+
+ pragma Inline (Copy);
+
+
+ pragma Inline (Color_Average);
+ pragma Inline (Desaturate);
+
+
+ pragma Inline (Name);
+ pragma Inline (Reload);
+
+
+ pragma Inline (Set_Scaling_Algorithm);
+ pragma Inline (Scale);
+
+
+ pragma Inline (Draw);
+
+
end FLTK.Images.Shared;
diff --git a/src/fltk-images.adb b/src/fltk-images.adb
index 42226e2..008e0b2 100644
--- a/src/fltk-images.adb
+++ b/src/fltk-images.adb
@@ -18,21 +18,38 @@ package body FLTK.Images is
(W, H, D : in Interfaces.C.int)
return System.Address;
pragma Import (C, new_fl_image, "new_fl_image");
+ pragma Inline (new_fl_image);
procedure free_fl_image
(I : in System.Address);
pragma Import (C, free_fl_image, "free_fl_image");
+ pragma Inline (free_fl_image);
+
+
+
+
+ function fl_image_get_rgb_scaling
+ return Interfaces.C.int;
+ pragma Import (C, fl_image_get_rgb_scaling, "fl_image_get_rgb_scaling");
+ pragma Inline (fl_image_get_rgb_scaling);
+
+ procedure fl_image_set_rgb_scaling
+ (T : in Interfaces.C.int);
+ pragma Import (C, fl_image_set_rgb_scaling, "fl_image_set_rgb_scaling");
+ pragma Inline (fl_image_set_rgb_scaling);
function fl_image_copy
(I : in System.Address;
W, H : in Interfaces.C.int)
return System.Address;
pragma Import (C, fl_image_copy, "fl_image_copy");
+ pragma Inline (fl_image_copy);
function fl_image_copy2
(I : in System.Address)
return System.Address;
pragma Import (C, fl_image_copy2, "fl_image_copy2");
+ pragma Inline (fl_image_copy2);
@@ -42,10 +59,12 @@ package body FLTK.Images is
C : in Interfaces.C.int;
B : in Interfaces.C.C_float);
pragma Import (C, fl_image_color_average, "fl_image_color_average");
+ pragma Inline (fl_image_color_average);
procedure fl_image_desaturate
(I : in System.Address);
pragma Import (C, fl_image_desaturate, "fl_image_desaturate");
+ pragma Inline (fl_image_desaturate);
@@ -53,6 +72,7 @@ package body FLTK.Images is
procedure fl_image_inactive
(I : in System.Address);
pragma Import (C, fl_image_inactive, "fl_image_inactive");
+ pragma Inline (fl_image_inactive);
@@ -61,16 +81,19 @@ package body FLTK.Images is
(I : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_image_w, "fl_image_w");
+ pragma Inline (fl_image_w);
function fl_image_h
(I : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_image_h, "fl_image_h");
+ pragma Inline (fl_image_h);
function fl_image_d
(I : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_image_d, "fl_image_d");
+ pragma Inline (fl_image_d);
@@ -79,16 +102,19 @@ package body FLTK.Images is
(I : in System.Address;
X, Y : in Interfaces.C.int);
pragma Import (C, fl_image_draw, "fl_image_draw");
+ pragma Inline (fl_image_draw);
procedure fl_image_draw2
(I : in System.Address;
X, Y, W, H, CX, CY : in Interfaces.C.int);
pragma Import (C, fl_image_draw2, "fl_image_draw2");
+ pragma Inline (fl_image_draw2);
procedure fl_image_draw_empty
(I : in System.Address;
X, Y : in Interfaces.C.int);
pragma Import (C, fl_image_draw_empty, "fl_image_draw_empty");
+ pragma Inline (fl_image_draw_empty);
@@ -136,6 +162,20 @@ package body FLTK.Images is
+ function Get_Copy_Algorithm
+ return Scaling_Kind is
+ begin
+ return Scaling_Kind'Val (fl_image_get_rgb_scaling);
+ end Get_Copy_Algorithm;
+
+
+ procedure Set_Copy_Algorithm
+ (To : in Scaling_Kind) is
+ begin
+ fl_image_set_rgb_scaling (Scaling_Kind'Pos (To));
+ end Set_Copy_Algorithm;
+
+
function Copy
(This : in Image;
Width, Height : in Natural)
diff --git a/src/fltk-images.ads b/src/fltk-images.ads
index 86ddbdb..053ed19 100644
--- a/src/fltk-images.ads
+++ b/src/fltk-images.ads
@@ -5,6 +5,11 @@ package FLTK.Images is
type Image is new Wrapper with private;
+ type Image_Reference (Data : not null access Image'Class) is limited null record
+ with Implicit_Dereference => Data;
+
+ type Scaling_Kind is (Nearest, Bilinear);
+
type Blend is new Float range 0.0 .. 1.0;
No_Image_Error, File_Access_Error, Format_Error : exception;
@@ -23,6 +28,12 @@ package FLTK.Images is
+ function Get_Copy_Algorithm
+ return Scaling_Kind;
+
+ procedure Set_Copy_Algorithm
+ (To : in Scaling_Kind);
+
function Copy
(This : in Image;
Width, Height : in Natural)
@@ -96,6 +107,28 @@ private
+ pragma Inline (Copy);
+
+
+ pragma Inline (Color_Average);
+ pragma Inline (Desaturate);
+
+
+ pragma Inline (Inactive);
+ pragma Inline (Is_Empty);
+
+
+ pragma Inline (Get_W);
+ pragma Inline (Get_H);
+ pragma Inline (Get_D);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Draw_Empty);
+
+
+
+
function fl_image_fail
(I : in System.Address)
return Interfaces.C.int;
diff --git a/src/fltk-widgets-valuators-sliders-fill.adb b/src/fltk-widgets-valuators-sliders-fill.adb
index bdd47bf..dfb87dd 100644
--- a/src/fltk-widgets-valuators-sliders-fill.adb
+++ b/src/fltk-widgets-valuators-sliders-fill.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Fill is
procedure fill_slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, fill_slider_set_draw_hook, "fill_slider_set_draw_hook");
+ pragma Inline (fill_slider_set_draw_hook);
procedure fill_slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, fill_slider_set_handle_hook, "fill_slider_set_handle_hook");
+ pragma Inline (fill_slider_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Fill is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_fill_slider, "new_fl_fill_slider");
+ pragma Inline (new_fl_fill_slider);
procedure free_fl_fill_slider
(D : in System.Address);
pragma Import (C, free_fl_fill_slider, "free_fl_fill_slider");
+ pragma Inline (free_fl_fill_slider);
@@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Sliders.Fill is
procedure fl_fill_slider_draw
(W : in System.Address);
pragma Import (C, fl_fill_slider_draw, "fl_fill_slider_draw");
+ pragma Inline (fl_fill_slider_draw);
function fl_fill_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_fill_slider_handle, "fl_fill_slider_handle");
+ pragma Inline (fl_fill_slider_handle);
diff --git a/src/fltk-widgets-valuators-sliders-fill.ads b/src/fltk-widgets-valuators-sliders-fill.ads
index cbf2856..115e8da 100644
--- a/src/fltk-widgets-valuators-sliders-fill.ads
+++ b/src/fltk-widgets-valuators-sliders-fill.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Fill is
type Fill_Slider is new Slider with private;
+ type Fill_Slider_Reference (Data : not null access Fill_Slider'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -38,5 +41,11 @@ private
(This : in out Fill_Slider);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Fill;
diff --git a/src/fltk-widgets-valuators-sliders-hor_fill.adb b/src/fltk-widgets-valuators-sliders-hor_fill.adb
index 2ce38d9..7111dd0 100644
--- a/src/fltk-widgets-valuators-sliders-hor_fill.adb
+++ b/src/fltk-widgets-valuators-sliders-hor_fill.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Fill is
procedure hor_fill_slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, hor_fill_slider_set_draw_hook, "hor_fill_slider_set_draw_hook");
+ pragma Inline (hor_fill_slider_set_draw_hook);
procedure hor_fill_slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, hor_fill_slider_set_handle_hook, "hor_fill_slider_set_handle_hook");
+ pragma Inline (hor_fill_slider_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Fill is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_hor_fill_slider, "new_fl_hor_fill_slider");
+ pragma Inline (new_fl_hor_fill_slider);
procedure free_fl_hor_fill_slider
(D : in System.Address);
pragma Import (C, free_fl_hor_fill_slider, "free_fl_hor_fill_slider");
+ pragma Inline (free_fl_hor_fill_slider);
@@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Fill is
procedure fl_hor_fill_slider_draw
(W : in System.Address);
pragma Import (C, fl_hor_fill_slider_draw, "fl_hor_fill_slider_draw");
+ pragma Inline (fl_hor_fill_slider_draw);
function fl_hor_fill_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_hor_fill_slider_handle, "fl_hor_fill_slider_handle");
+ pragma Inline (fl_hor_fill_slider_handle);
diff --git a/src/fltk-widgets-valuators-sliders-hor_fill.ads b/src/fltk-widgets-valuators-sliders-hor_fill.ads
index fa30a68..06e7ad4 100644
--- a/src/fltk-widgets-valuators-sliders-hor_fill.ads
+++ b/src/fltk-widgets-valuators-sliders-hor_fill.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Hor_Fill is
type Hor_Fill_Slider is new Slider with private;
+ type Hor_Fill_Slider_Reference (Data : not null access Hor_Fill_Slider'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -38,5 +41,11 @@ private
(This : in out Hor_Fill_Slider);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Hor_Fill;
diff --git a/src/fltk-widgets-valuators-sliders-hor_nice.adb b/src/fltk-widgets-valuators-sliders-hor_nice.adb
index 82801e8..0bf91d5 100644
--- a/src/fltk-widgets-valuators-sliders-hor_nice.adb
+++ b/src/fltk-widgets-valuators-sliders-hor_nice.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Nice is
procedure hor_nice_slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, hor_nice_slider_set_draw_hook, "hor_nice_slider_set_draw_hook");
+ pragma Inline (hor_nice_slider_set_draw_hook);
procedure hor_nice_slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, hor_nice_slider_set_handle_hook, "hor_nice_slider_set_handle_hook");
+ pragma Inline (hor_nice_slider_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Nice is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_hor_nice_slider, "new_fl_hor_nice_slider");
+ pragma Inline (new_fl_hor_nice_slider);
procedure free_fl_hor_nice_slider
(D : in System.Address);
pragma Import (C, free_fl_hor_nice_slider, "free_fl_hor_nice_slider");
+ pragma Inline (free_fl_hor_nice_slider);
@@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Nice is
procedure fl_hor_nice_slider_draw
(W : in System.Address);
pragma Import (C, fl_hor_nice_slider_draw, "fl_hor_nice_slider_draw");
+ pragma Inline (fl_hor_nice_slider_draw);
function fl_hor_nice_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_hor_nice_slider_handle, "fl_hor_nice_slider_handle");
+ pragma Inline (fl_hor_nice_slider_handle);
diff --git a/src/fltk-widgets-valuators-sliders-hor_nice.ads b/src/fltk-widgets-valuators-sliders-hor_nice.ads
index f5b48f7..8a4b593 100644
--- a/src/fltk-widgets-valuators-sliders-hor_nice.ads
+++ b/src/fltk-widgets-valuators-sliders-hor_nice.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Hor_Nice is
type Hor_Nice_Slider is new Slider with private;
+ type Hor_Nice_Slider_Reference (Data : not null access Hor_Nice_Slider'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -38,5 +41,11 @@ private
(This : in out Hor_Nice_Slider);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Hor_Nice;
diff --git a/src/fltk-widgets-valuators-sliders-horizontal.adb b/src/fltk-widgets-valuators-sliders-horizontal.adb
index bee5fc3..2ee7598 100644
--- a/src/fltk-widgets-valuators-sliders-horizontal.adb
+++ b/src/fltk-widgets-valuators-sliders-horizontal.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Horizontal is
procedure horizontal_slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, horizontal_slider_set_draw_hook, "horizontal_slider_set_draw_hook");
+ pragma Inline (horizontal_slider_set_draw_hook);
procedure horizontal_slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, horizontal_slider_set_handle_hook, "horizontal_slider_set_handle_hook");
+ pragma Inline (horizontal_slider_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Horizontal is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_horizontal_slider, "new_fl_horizontal_slider");
+ pragma Inline (new_fl_horizontal_slider);
procedure free_fl_horizontal_slider
(D : in System.Address);
pragma Import (C, free_fl_horizontal_slider, "free_fl_horizontal_slider");
+ pragma Inline (free_fl_horizontal_slider);
@@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Sliders.Horizontal is
procedure fl_horizontal_slider_draw
(W : in System.Address);
pragma Import (C, fl_horizontal_slider_draw, "fl_horizontal_slider_draw");
+ pragma Inline (fl_horizontal_slider_draw);
function fl_horizontal_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_horizontal_slider_handle, "fl_horizontal_slider_handle");
+ pragma Inline (fl_horizontal_slider_handle);
diff --git a/src/fltk-widgets-valuators-sliders-horizontal.ads b/src/fltk-widgets-valuators-sliders-horizontal.ads
index 0cb2d5b..8f1b96a 100644
--- a/src/fltk-widgets-valuators-sliders-horizontal.ads
+++ b/src/fltk-widgets-valuators-sliders-horizontal.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Horizontal is
type Horizontal_Slider is new Slider with private;
+ type Horizontal_Slider_Reference (Data : not null access Horizontal_Slider'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -38,5 +41,11 @@ private
(This : in out Horizontal_Slider);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Horizontal;
diff --git a/src/fltk-widgets-valuators-sliders-nice.adb b/src/fltk-widgets-valuators-sliders-nice.adb
index 188103c..2143b8e 100644
--- a/src/fltk-widgets-valuators-sliders-nice.adb
+++ b/src/fltk-widgets-valuators-sliders-nice.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Nice is
procedure nice_slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, nice_slider_set_draw_hook, "nice_slider_set_draw_hook");
+ pragma Inline (nice_slider_set_draw_hook);
procedure nice_slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, nice_slider_set_handle_hook, "nice_slider_set_handle_hook");
+ pragma Inline (nice_slider_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Nice is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_nice_slider, "new_fl_nice_slider");
+ pragma Inline (new_fl_nice_slider);
procedure free_fl_nice_slider
(D : in System.Address);
pragma Import (C, free_fl_nice_slider, "free_fl_nice_slider");
+ pragma Inline (free_fl_nice_slider);
@@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Sliders.Nice is
procedure fl_nice_slider_draw
(W : in System.Address);
pragma Import (C, fl_nice_slider_draw, "fl_nice_slider_draw");
+ pragma Inline (fl_nice_slider_draw);
function fl_nice_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_nice_slider_handle, "fl_nice_slider_handle");
+ pragma Inline (fl_nice_slider_handle);
diff --git a/src/fltk-widgets-valuators-sliders-nice.ads b/src/fltk-widgets-valuators-sliders-nice.ads
index 380887f..55a5f04 100644
--- a/src/fltk-widgets-valuators-sliders-nice.ads
+++ b/src/fltk-widgets-valuators-sliders-nice.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Nice is
type Nice_Slider is new Slider with private;
+ type Nice_Slider_Reference (Data : not null access Nice_Slider'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -38,5 +41,11 @@ private
(This : in out Nice_Slider);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Nice;
diff --git a/src/fltk-widgets-valuators-sliders-scrollbars.adb b/src/fltk-widgets-valuators-sliders-scrollbars.adb
index 2fc013f..40f9777 100644
--- a/src/fltk-widgets-valuators-sliders-scrollbars.adb
+++ b/src/fltk-widgets-valuators-sliders-scrollbars.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Scrollbars is
procedure scrollbar_set_draw_hook
(W, D : in System.Address);
pragma Import (C, scrollbar_set_draw_hook, "scrollbar_set_draw_hook");
+ pragma Inline (scrollbar_set_draw_hook);
procedure scrollbar_set_handle_hook
(W, H : in System.Address);
pragma Import (C, scrollbar_set_handle_hook, "scrollbar_set_handle_hook");
+ pragma Inline (scrollbar_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Scrollbars is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_scrollbar, "new_fl_scrollbar");
+ pragma Inline (new_fl_scrollbar);
procedure free_fl_scrollbar
(D : in System.Address);
pragma Import (C, free_fl_scrollbar, "free_fl_scrollbar");
+ pragma Inline (free_fl_scrollbar);
@@ -41,26 +45,31 @@ package body FLTK.Widgets.Valuators.Sliders.Scrollbars is
(S : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_scrollbar_get_linesize, "fl_scrollbar_get_linesize");
+ pragma Inline (fl_scrollbar_get_linesize);
procedure fl_scrollbar_set_linesize
(S : in System.Address;
T : in Interfaces.C.int);
pragma Import (C, fl_scrollbar_set_linesize, "fl_scrollbar_set_linesize");
+ pragma Inline (fl_scrollbar_set_linesize);
function fl_scrollbar_get_value
(S : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_scrollbar_get_value, "fl_scrollbar_get_value");
+ pragma Inline (fl_scrollbar_get_value);
procedure fl_scrollbar_set_value
(S : in System.Address;
T : in Interfaces.C.int);
pragma Import (C, fl_scrollbar_set_value, "fl_scrollbar_set_value");
+ pragma Inline (fl_scrollbar_set_value);
procedure fl_scrollbar_set_value2
(S : in System.Address;
P, W, F, T : in Interfaces.C.int);
pragma Import (C, fl_scrollbar_set_value2, "fl_scrollbar_set_value2");
+ pragma Inline (fl_scrollbar_set_value2);
@@ -68,12 +77,14 @@ package body FLTK.Widgets.Valuators.Sliders.Scrollbars is
procedure fl_scrollbar_draw
(W : in System.Address);
pragma Import (C, fl_scrollbar_draw, "fl_scrollbar_draw");
+ pragma Inline (fl_scrollbar_draw);
function fl_scrollbar_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_scrollbar_handle, "fl_scrollbar_handle");
+ pragma Inline (fl_scrollbar_handle);
diff --git a/src/fltk-widgets-valuators-sliders-scrollbars.ads b/src/fltk-widgets-valuators-sliders-scrollbars.ads
index 9b229b6..c69aa4b 100644
--- a/src/fltk-widgets-valuators-sliders-scrollbars.ads
+++ b/src/fltk-widgets-valuators-sliders-scrollbars.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Scrollbars is
type Scrollbar is new Slider with private;
+ type Scrollbar_Reference (Data : not null access Scrollbar'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -64,5 +67,18 @@ private
(This : in out Scrollbar);
+
+
+ pragma Inline (Get_Line_Size);
+ pragma Inline (Set_Line_Size);
+ pragma Inline (Get_Position);
+ pragma Inline (Set_Position);
+ pragma Inline (Set_All);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Scrollbars;
diff --git a/src/fltk-widgets-valuators-sliders-value-horizontal.adb b/src/fltk-widgets-valuators-sliders-value-horizontal.adb
index 77b9fd6..fb40674 100644
--- a/src/fltk-widgets-valuators-sliders-value-horizontal.adb
+++ b/src/fltk-widgets-valuators-sliders-value-horizontal.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Value.Horizontal is
procedure hor_value_slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, hor_value_slider_set_draw_hook, "hor_value_slider_set_draw_hook");
+ pragma Inline (hor_value_slider_set_draw_hook);
procedure hor_value_slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, hor_value_slider_set_handle_hook, "hor_value_slider_set_handle_hook");
+ pragma Inline (hor_value_slider_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Value.Horizontal is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_hor_value_slider, "new_fl_hor_value_slider");
+ pragma Inline (new_fl_hor_value_slider);
procedure free_fl_hor_value_slider
(D : in System.Address);
pragma Import (C, free_fl_hor_value_slider, "free_fl_hor_value_slider");
+ pragma Inline (free_fl_hor_value_slider);
@@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Sliders.Value.Horizontal is
procedure fl_hor_value_slider_draw
(W : in System.Address);
pragma Import (C, fl_hor_value_slider_draw, "fl_hor_value_slider_draw");
+ pragma Inline (fl_hor_value_slider_draw);
function fl_hor_value_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_hor_value_slider_handle, "fl_hor_value_slider_handle");
+ pragma Inline (fl_hor_value_slider_handle);
diff --git a/src/fltk-widgets-valuators-sliders-value-horizontal.ads b/src/fltk-widgets-valuators-sliders-value-horizontal.ads
index 3b05627..2bdb8ea 100644
--- a/src/fltk-widgets-valuators-sliders-value-horizontal.ads
+++ b/src/fltk-widgets-valuators-sliders-value-horizontal.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Value.Horizontal is
type Hor_Value_Slider is new Value_Slider with private;
+ type Hor_Value_Slider_Reference (Data : not null access Hor_Value_Slider'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -38,5 +41,11 @@ private
(This : in out Hor_Value_Slider);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Value.Horizontal;
diff --git a/src/fltk-widgets-valuators-sliders-value.adb b/src/fltk-widgets-valuators-sliders-value.adb
index 584aca6..fa8756f 100644
--- a/src/fltk-widgets-valuators-sliders-value.adb
+++ b/src/fltk-widgets-valuators-sliders-value.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders.Value is
procedure value_slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, value_slider_set_draw_hook, "value_slider_set_draw_hook");
+ pragma Inline (value_slider_set_draw_hook);
procedure value_slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, value_slider_set_handle_hook, "value_slider_set_handle_hook");
+ pragma Inline (value_slider_set_handle_hook);
@@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Sliders.Value is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_value_slider, "new_fl_value_slider");
+ pragma Inline (new_fl_value_slider);
procedure free_fl_value_slider
(D : in System.Address);
pragma Import (C, free_fl_value_slider, "free_fl_value_slider");
+ pragma Inline (free_fl_value_slider);
@@ -41,31 +45,37 @@ package body FLTK.Widgets.Valuators.Sliders.Value is
(S : in System.Address)
return Interfaces.C.unsigned;
pragma Import (C, fl_value_slider_get_textcolor, "fl_value_slider_get_textcolor");
+ pragma Inline (fl_value_slider_get_textcolor);
procedure fl_value_slider_set_textcolor
(S : in System.Address;
C : in Interfaces.C.unsigned);
pragma Import (C, fl_value_slider_set_textcolor, "fl_value_slider_set_textcolor");
+ pragma Inline (fl_value_slider_set_textcolor);
function fl_value_slider_get_textfont
(S : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_value_slider_get_textfont, "fl_value_slider_get_textfont");
+ pragma Inline (fl_value_slider_get_textfont);
procedure fl_value_slider_set_textfont
(S : in System.Address;
F : in Interfaces.C.int);
pragma Import (C, fl_value_slider_set_textfont, "fl_value_slider_set_textfont");
+ pragma Inline (fl_value_slider_set_textfont);
function fl_value_slider_get_textsize
(S : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_value_slider_get_textsize, "fl_value_slider_get_textsize");
+ pragma Inline (fl_value_slider_get_textsize);
procedure fl_value_slider_set_textsize
(S : in System.Address;
F : in Interfaces.C.int);
pragma Import (C, fl_value_slider_set_textsize, "fl_value_slider_set_textsize");
+ pragma Inline (fl_value_slider_set_textsize);
@@ -73,12 +83,14 @@ package body FLTK.Widgets.Valuators.Sliders.Value is
procedure fl_value_slider_draw
(W : in System.Address);
pragma Import (C, fl_value_slider_draw, "fl_value_slider_draw");
+ pragma Inline (fl_value_slider_draw);
function fl_value_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_value_slider_handle, "fl_value_slider_handle");
+ pragma Inline (fl_value_slider_handle);
diff --git a/src/fltk-widgets-valuators-sliders-value.ads b/src/fltk-widgets-valuators-sliders-value.ads
index f3ac1c3..fbbf717 100644
--- a/src/fltk-widgets-valuators-sliders-value.ads
+++ b/src/fltk-widgets-valuators-sliders-value.ads
@@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Sliders.Value is
type Value_Slider is new Slider with private;
+ type Value_Slider_Reference (Data : not null access Value_Slider'Class) is
+ limited null record with Implicit_Dereference => Data;
+
@@ -65,5 +68,19 @@ private
(This : in out Value_Slider);
+
+
+ pragma Inline (Get_Text_Color);
+ pragma Inline (Set_Text_Color);
+ pragma Inline (Get_Text_Font);
+ pragma Inline (Set_Text_Font);
+ pragma Inline (Get_Text_Size);
+ pragma Inline (Set_Text_Size);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders.Value;
diff --git a/src/fltk-widgets-valuators-sliders.adb b/src/fltk-widgets-valuators-sliders.adb
index 752a5aa..01baf1c 100644
--- a/src/fltk-widgets-valuators-sliders.adb
+++ b/src/fltk-widgets-valuators-sliders.adb
@@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Sliders is
procedure slider_set_draw_hook
(W, D : in System.Address);
pragma Import (C, slider_set_draw_hook, "slider_set_draw_hook");
+ pragma Inline (slider_set_draw_hook);
procedure slider_set_handle_hook
(W, H : in System.Address);
pragma Import (C, slider_set_handle_hook, "slider_set_handle_hook");
+ pragma Inline (slider_set_handle_hook);
@@ -29,10 +31,27 @@ package body FLTK.Widgets.Valuators.Sliders is
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_slider, "new_fl_slider");
+ pragma Inline (new_fl_slider);
procedure free_fl_slider
(D : in System.Address);
pragma Import (C, free_fl_slider, "free_fl_slider");
+ pragma Inline (free_fl_slider);
+
+
+
+
+ function fl_slider_get_type
+ (S : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_slider_get_type, "fl_slider_get_type");
+ pragma Inline (fl_slider_get_type);
+
+ procedure fl_slider_set_type
+ (S : in System.Address;
+ T : in Interfaces.C.int);
+ pragma Import (C, fl_slider_set_type, "fl_slider_set_type");
+ pragma Inline (fl_slider_set_type);
@@ -41,32 +60,38 @@ package body FLTK.Widgets.Valuators.Sliders is
(S : in System.Address;
A, B : in Interfaces.C.double);
pragma Import (C, fl_slider_set_bounds, "fl_slider_set_bounds");
+ pragma Inline (fl_slider_set_bounds);
function fl_slider_get_slider
(S : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_slider_get_slider, "fl_slider_get_slider");
+ pragma Inline (fl_slider_get_slider);
procedure fl_slider_set_slider
(S : in System.Address;
T : in Interfaces.C.int);
pragma Import (C, fl_slider_set_slider, "fl_slider_set_slider");
+ pragma Inline (fl_slider_set_slider);
function fl_slider_get_slider_size
(S : in System.Address)
return Interfaces.C.C_float;
pragma Import (C, fl_slider_get_slider_size, "fl_slider_get_slider_size");
+ pragma Inline (fl_slider_get_slider_size);
procedure fl_slider_set_slider_size
(S : in System.Address;
T : in Interfaces.C.C_float);
pragma Import (C, fl_slider_set_slider_size, "fl_slider_set_slider_size");
+ pragma Inline (fl_slider_set_slider_size);
function fl_slider_scrollvalue
(S : in System.Address;
P, Z, F, T : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_slider_scrollvalue, "fl_slider_scrollvalue");
+ pragma Inline (fl_slider_scrollvalue);
@@ -74,12 +99,14 @@ package body FLTK.Widgets.Valuators.Sliders is
procedure fl_slider_draw
(W : in System.Address);
pragma Import (C, fl_slider_draw, "fl_slider_draw");
+ pragma Inline (fl_slider_draw);
function fl_slider_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_slider_handle, "fl_slider_handle");
+ pragma Inline (fl_slider_handle);
@@ -126,14 +153,22 @@ package body FLTK.Widgets.Valuators.Sliders is
+ function Get_Slider_Type
+ (This : in Slider)
+ return Slider_Kind is
+ begin
+ return Slider_Kind'Val (fl_slider_get_type (This.Void_Ptr));
+ end Get_Slider_Type;
+
+
procedure Set_Bounds
- (This : in out Slider;
- A, B : in Long_Float) is
+ (This : in out Slider;
+ Min, Max : in Long_Float) is
begin
fl_slider_set_bounds
(This.Void_Ptr,
- Interfaces.C.double (A),
- Interfaces.C.double (B));
+ Interfaces.C.double (Min),
+ Interfaces.C.double (Max));
end Set_Bounds;
@@ -206,5 +241,21 @@ package body FLTK.Widgets.Valuators.Sliders is
end Handle;
+
+
+ package body Extra is
+
+ procedure Set_Slider_Type
+ (This : in out Slider;
+ To : in Slider_Kind) is
+ begin
+ fl_slider_set_type (This.Void_Ptr, Slider_Kind'Pos (To));
+ end Set_Slider_Type;
+
+ pragma Inline (Set_Slider_Type);
+
+ end Extra;
+
+
end FLTK.Widgets.Valuators.Sliders;
diff --git a/src/fltk-widgets-valuators-sliders.ads b/src/fltk-widgets-valuators-sliders.ads
index fda69d2..77ad933 100644
--- a/src/fltk-widgets-valuators-sliders.ads
+++ b/src/fltk-widgets-valuators-sliders.ads
@@ -5,6 +5,14 @@ package FLTK.Widgets.Valuators.Sliders is
type Slider is new Valuator with private;
+ type Slider_Reference (Data : not null access Slider'Class) is limited null record
+ with Implicit_Dereference => Data;
+
+ type Slider_Kind is
+ (Vertical_Kind, Horizontal_Kind,
+ Vert_Fill_Kind, Hor_Fill_Kind,
+ Vert_Nice_Kind, Hor_Nice_Kind);
+
@@ -20,9 +28,13 @@ package FLTK.Widgets.Valuators.Sliders is
+ function Get_Slider_Type
+ (This : in Slider)
+ return Slider_Kind;
+
procedure Set_Bounds
- (This : in out Slider;
- A, B : in Long_Float);
+ (This : in out Slider;
+ Min, Max : in Long_Float);
function Get_Box
(This : in Slider)
@@ -59,6 +71,17 @@ package FLTK.Widgets.Valuators.Sliders is
return Event_Outcome;
+
+
+ package Extra is
+
+ procedure Set_Slider_Type
+ (This : in out Slider;
+ To : in Slider_Kind);
+
+ end Extra;
+
+
private
@@ -68,5 +91,20 @@ private
(This : in out Slider);
+
+
+ pragma Inline (Get_Slider_Type);
+ pragma Inline (Set_Bounds);
+ pragma Inline (Get_Box);
+ pragma Inline (Set_Box);
+ pragma Inline (Get_Slide_Size);
+ pragma Inline (Set_Slide_Size);
+ pragma Inline (Set_Scrollvalue);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
end FLTK.Widgets.Valuators.Sliders;