From ae3aaf71338960e85d27c88d7004497409c6a6d9 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 21 Apr 2018 00:19:09 +1000 Subject: More polishing, fixing of minor overlooked things, etc --- doc/fl_bitmap.html | 135 +++++++++++ doc/fl_bmp_image.html | 65 +++++ doc/fl_device.html | 42 ++++ doc/fl_fill_slider.html | 84 +++++++ doc/fl_hor_fill_slider.html | 84 +++++++ doc/fl_hor_nice_slider.html | 84 +++++++ doc/fl_hor_slider.html | 84 +++++++ doc/fl_hor_value_slider.html | 84 +++++++ doc/fl_image.html | 270 +++++++++++++++++++++ doc/fl_jpeg_image.html | 72 ++++++ doc/fl_nice_slider.html | 84 +++++++ doc/fl_png_image.html | 72 ++++++ doc/fl_pnm_image.html | 65 +++++ doc/fl_rgb_image.html | 171 +++++++++++++ doc/fl_scrollbar.html | 146 +++++++++++ doc/fl_shared_image.html | 264 ++++++++++++++++++++ doc/fl_slider.html | 187 ++++++++++++++ doc/fl_value_slider.html | 154 ++++++++++++ doc/fl_xbm_image.html | 65 +++++ progress.txt | 38 +-- src/c_fl_bitmap.cpp | 10 +- src/c_fl_bitmap.h | 9 +- src/c_fl_bmp_image.h | 4 +- src/c_fl_fill_slider.h | 12 +- src/c_fl_hor_fill_slider.h | 12 +- src/c_fl_hor_nice_slider.h | 12 +- src/c_fl_hor_value_slider.cpp | 26 -- src/c_fl_hor_value_slider.h | 12 +- src/c_fl_horizontal_slider.h | 12 +- src/c_fl_image.cpp | 28 ++- src/c_fl_image.h | 32 +-- src/c_fl_jpeg_image.h | 4 +- src/c_fl_nice_slider.h | 12 +- src/c_fl_png_image.h | 4 +- src/c_fl_pnm_image.h | 4 +- src/c_fl_rgb_image.cpp | 16 +- src/c_fl_rgb_image.h | 13 +- src/c_fl_scrollbar.cpp | 10 +- src/c_fl_scrollbar.h | 22 +- src/c_fl_shared_image.cpp | 18 +- src/c_fl_shared_image.h | 29 ++- src/c_fl_slider.cpp | 11 + src/c_fl_slider.h | 28 ++- src/c_fl_value_slider.cpp | 12 +- src/c_fl_value_slider.h | 24 +- src/c_fl_xbm_image.h | 4 +- src/fltk-images-bitmaps-xbm.adb | 2 + src/fltk-images-bitmaps-xbm.ads | 3 + src/fltk-images-bitmaps.adb | 21 ++ src/fltk-images-bitmaps.ads | 13 + src/fltk-images-rgb-bmp.adb | 2 + src/fltk-images-rgb-bmp.ads | 3 + src/fltk-images-rgb-jpeg.adb | 2 + src/fltk-images-rgb-jpeg.ads | 3 + src/fltk-images-rgb-png.adb | 2 + src/fltk-images-rgb-png.ads | 3 + src/fltk-images-rgb-pnm.adb | 2 + src/fltk-images-rgb-pnm.ads | 3 + src/fltk-images-rgb.adb | 23 ++ src/fltk-images-rgb.ads | 19 ++ src/fltk-images-shared.adb | 25 +- src/fltk-images-shared.ads | 26 +- src/fltk-images.adb | 40 +++ src/fltk-images.ads | 33 +++ src/fltk-widgets-valuators-sliders-fill.adb | 6 + src/fltk-widgets-valuators-sliders-fill.ads | 9 + src/fltk-widgets-valuators-sliders-hor_fill.adb | 6 + src/fltk-widgets-valuators-sliders-hor_fill.ads | 9 + src/fltk-widgets-valuators-sliders-hor_nice.adb | 6 + src/fltk-widgets-valuators-sliders-hor_nice.ads | 9 + src/fltk-widgets-valuators-sliders-horizontal.adb | 6 + src/fltk-widgets-valuators-sliders-horizontal.ads | 9 + src/fltk-widgets-valuators-sliders-nice.adb | 6 + src/fltk-widgets-valuators-sliders-nice.ads | 9 + src/fltk-widgets-valuators-sliders-scrollbars.adb | 11 + src/fltk-widgets-valuators-sliders-scrollbars.ads | 16 ++ ...-widgets-valuators-sliders-value-horizontal.adb | 6 + ...-widgets-valuators-sliders-value-horizontal.ads | 9 + src/fltk-widgets-valuators-sliders-value.adb | 12 + src/fltk-widgets-valuators-sliders-value.ads | 17 ++ src/fltk-widgets-valuators-sliders.adb | 59 ++++- src/fltk-widgets-valuators-sliders.ads | 42 +++- 82 files changed, 2884 insertions(+), 218 deletions(-) create mode 100644 doc/fl_bitmap.html create mode 100644 doc/fl_bmp_image.html create mode 100644 doc/fl_device.html create mode 100644 doc/fl_fill_slider.html create mode 100644 doc/fl_hor_fill_slider.html create mode 100644 doc/fl_hor_nice_slider.html create mode 100644 doc/fl_hor_slider.html create mode 100644 doc/fl_hor_value_slider.html create mode 100644 doc/fl_image.html create mode 100644 doc/fl_jpeg_image.html create mode 100644 doc/fl_nice_slider.html create mode 100644 doc/fl_png_image.html create mode 100644 doc/fl_pnm_image.html create mode 100644 doc/fl_rgb_image.html create mode 100644 doc/fl_scrollbar.html create mode 100644 doc/fl_shared_image.html create mode 100644 doc/fl_slider.html create mode 100644 doc/fl_value_slider.html create mode 100644 doc/fl_xbm_image.html diff --git a/doc/fl_bitmap.html b/doc/fl_bitmap.html new file mode 100644 index 0000000..4d22550 --- /dev/null +++ b/doc/fl_bitmap.html @@ -0,0 +1,135 @@ + + + + + + + Fl_Bitmap Binding Map + + + + + + +

Fl_Bitmap Binding Map

+ + + + + + + + + + +
Package name
Fl_BitmapFLTK.Images.Bitmaps
+ + + + + + + + + + + + + + + + +
Types
Fl_BitmapBitmap
 Bitmap_Reference
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Bitmap(const uchar *bits, int W, int H);
+
 
+Fl_Bitmap(const char *bits, int W, int H);
+
 
+virtual Fl_Image * copy(int W, int H);
+
+function Copy
+       (This          : in Bitmap;
+        Width, Height : in Natural)
+    return Bitmap'Class;
+
+Fl_Image * copy();
+
+function Copy
+       (This : in Bitmap)
+    return Bitmap'Class;
+
+virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
+
+procedure Draw
+       (This       : in Bitmap;
+        X, Y, W, H : in Integer;
+        CX, CY     : in Integer := 0);
+
+void draw(int X, int Y);
+
+procedure Draw
+       (This : in Bitmap;
+        X, Y : in Integer);
+
+virtual void label(Fl_Widget *w);
+
 
+virtual void label(Fl_Menu_Item *m);
+
 
+virtual void uncache();
+
 
+ + + + + diff --git a/doc/fl_bmp_image.html b/doc/fl_bmp_image.html new file mode 100644 index 0000000..dd0ce62 --- /dev/null +++ b/doc/fl_bmp_image.html @@ -0,0 +1,65 @@ + + + + + + + Fl_BMP_Image Binding Map + + + + + + +

Fl_BMP_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_BMP_ImageFLTK.Images.RGB.BMP
+ + + + + + + + + + + + + + + + +
Types
Fl_BMP_ImageBMP_Image
 BMP_Image_Reference
+ + + + + + + + + + + +
Functions and Procedures
+Fl_BMP_Image(const char *filename);
+
+function Create
+       (Filename : in String)
+    return BMP_Image;
+
+ + + + + diff --git a/doc/fl_device.html b/doc/fl_device.html new file mode 100644 index 0000000..5e62da8 --- /dev/null +++ b/doc/fl_device.html @@ -0,0 +1,42 @@ + + + + + + + Fl_Device Binding Map + + + + + + +

Fl_Device Binding Map

+ + + + + + + + + + +
Package name
Fl_DeviceFLTK.Devices
+ + + + + + + + + + + +
Types
Fl_DeviceDevice
+ + + + + diff --git a/doc/fl_fill_slider.html b/doc/fl_fill_slider.html new file mode 100644 index 0000000..c42a5e1 --- /dev/null +++ b/doc/fl_fill_slider.html @@ -0,0 +1,84 @@ + + + + + + + Fl_Fill_Slider Binding Map + + + + + + +

Fl_Fill_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_Fill_SliderFLTK.Widgets.Valuators.Sliders.Fill
+ + + + + + + + + + + + + + + + +
Types
Fl_Fill_SliderFill_Slider
 Fill_Slider_Reference
+ + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Fill_Slider(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Fill_Slider;
+
 
+procedure Draw
+       (This : in out Fill_Slider);
+
 
+function Handle
+       (This  : in out Fill_Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+ + + + + diff --git a/doc/fl_hor_fill_slider.html b/doc/fl_hor_fill_slider.html new file mode 100644 index 0000000..bf816d1 --- /dev/null +++ b/doc/fl_hor_fill_slider.html @@ -0,0 +1,84 @@ + + + + + + + Fl_Hor_Fill_Slider Binding Map + + + + + + +

Fl_Hor_Fill_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_Hor_Fill_SliderFLTK.Widgets.Valuators.Sliders.Hor_Fill
+ + + + + + + + + + + + + + + + +
Types
Fl_Hor_Fill_SliderHor_Fill_Slider
 Hor_Fill_Slider_Reference
+ + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Hor_Fill_Slider(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Hor_Fill_Slider;
+
 
+procedure Draw
+       (This : in out Hor_Fill_Slider);
+
 
+function Handle
+       (This  : in out Hor_Fill_Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+ + + + + diff --git a/doc/fl_hor_nice_slider.html b/doc/fl_hor_nice_slider.html new file mode 100644 index 0000000..6597050 --- /dev/null +++ b/doc/fl_hor_nice_slider.html @@ -0,0 +1,84 @@ + + + + + + + Fl_Hor_Nice_Slider Binding Map + + + + + + +

Fl_Hor_Nice_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_Hor_Nice_SliderFLTK.Widgets.Valuators.Sliders.Hor_Nice
+ + + + + + + + + + + + + + + + +
Types
Fl_Hor_Nice_SliderHor_Nice_Slider
 Hor_Nice_Slider_Reference
+ + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Hor_Nice_Slider(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Hor_Nice_Slider;
+
 
+procedure Draw
+       (This : in out Hor_Nice_Slider);
+
 
+function Handle
+       (This  : in out Hor_Nice_Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+ + + + + diff --git a/doc/fl_hor_slider.html b/doc/fl_hor_slider.html new file mode 100644 index 0000000..9cc9a22 --- /dev/null +++ b/doc/fl_hor_slider.html @@ -0,0 +1,84 @@ + + + + + + + Fl_Hor_Slider Binding Map + + + + + + +

Fl_Hor_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_Hor_SliderFLTK.Widgets.Valuators.Sliders.Horizontal
+ + + + + + + + + + + + + + + + +
Types
Fl_Hor_SliderHorizontal_Slider
 Horizontal_Slider_Reference
+ + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Hor_Slider(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Horizontal_Slider;
+
 
+procedure Draw
+       (This : in out Horizontal_Slider);
+
 
+function Handle
+       (This  : in out Horizontal_Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+ + + + + diff --git a/doc/fl_hor_value_slider.html b/doc/fl_hor_value_slider.html new file mode 100644 index 0000000..7d817a4 --- /dev/null +++ b/doc/fl_hor_value_slider.html @@ -0,0 +1,84 @@ + + + + + + + Fl_Hor_Value_Slider Binding Map + + + + + + +

Fl_Hor_Value_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_Hor_Value_SliderFLTK.Widgets.Valuators.Sliders.Value.Horizontal
+ + + + + + + + + + + + + + + + +
Types
Fl_Hor_Value_SliderHor_Value_Slider
 Hor_Value_Slider_Reference
+ + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Hor_Value_Slider(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Hor_Value_Slider;
+
 
+procedure Draw
+       (This : in out Hor_Value_Slider);
+
 
+function Handle
+       (This  : in out Hor_Value_Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+ + + + + diff --git a/doc/fl_image.html b/doc/fl_image.html new file mode 100644 index 0000000..4708f3f --- /dev/null +++ b/doc/fl_image.html @@ -0,0 +1,270 @@ + + + + + + + Fl_Image Binding Map + + + + + + +

Fl_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_ImageFLTK.Images
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Types
Fl_ImageImage
 Image_Reference
Fl_RGB_ScalingScaling_Kind
 Blend
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Image(int W, int H, int D);
+
+function Create
+       (Width, Height, Depth : in Natural)
+    return Image;
+
+virtual void color_average(Fl_Color c, float i);
+
+procedure Color_Average
+       (This   : in out Image;
+        Col    : in     Color;
+        Amount : in     Blend);
+
+virtual Fl_Image * copy(int W, int H);
+
+function Copy
+       (This          : in Image;
+        Width, Height : in Natural)
+    return Image'Class;
+
+Fl_Image * copy();
+
+function Copy
+       (This : in Image)
+    return Image'Class;
+
+int count() const;
+
 
+int d() const;
+
+function Get_D
+       (This : in Image)
+    return Natural;
+
+const char * const * data() const;
+
 
+virtual void desaturate();
+
+procedure Desaturate
+       (This : in out Image);
+
+virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
+
+procedure Draw
+       (This       : in Image;
+        X, Y, W, H : in Integer;
+        CX, CY     : in Integer := 0);
+
+void draw(int X, int Y);
+
+procedure Draw
+       (This : in Image;
+        X, Y : in Integer);
+
+void draw_empty(int X, int Y);
+
+procedure Draw_Empty
+       (This : in Image;
+        X, Y : in Integer);
+
+int fail();
+
+function Is_Empty
+       (This : in Image)
+    return Boolean;
+
+int h() const;
+
+function Get_H
+       (This : in Image)
+    return Natural;
+
+void inactive();
+
+procedure Inactive
+       (This : in out Image);
+
+virtual void label(Fl_Widget *w);
+
 
+virtual void label(Fl_Menu_Item *m);
+
 
+int ld() const;
+
 
+static void RGB_scaling(Fl_RGB_Scaling);
+
+procedure Set_Copy_Algorithm
+       (To : in Scaling_Kind);
+
+static Fl_RGB_Scaling RGB_scaling();
+
+function Get_Copy_Algorithm
+    return Scaling_Kind;
+
+virtual void uncache();
+
 
+int w() const;
+
+function Get_W
+       (This : in Image)
+    return Natural;
+
+ + + + + diff --git a/doc/fl_jpeg_image.html b/doc/fl_jpeg_image.html new file mode 100644 index 0000000..b948ab0 --- /dev/null +++ b/doc/fl_jpeg_image.html @@ -0,0 +1,72 @@ + + + + + + + Fl_JPEG_Image Binding Map + + + + + + +

Fl_JPEG_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_JPEG_ImageFLTK.Images.RGB.JPEG
+ + + + + + + + + + + + + + + + +
Types
Fl_JPEG_ImageJPEG_Image
 JPEG_Image_Reference
+ + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_JPEG_Image(const char *filename);
+
+function Create
+       (Filename : in String)
+    return JPEG_Image;
+
+Fl_JPEG_Image(const char *name, const unsigned char *data);
+
 
+ + + + + diff --git a/doc/fl_nice_slider.html b/doc/fl_nice_slider.html new file mode 100644 index 0000000..571bf07 --- /dev/null +++ b/doc/fl_nice_slider.html @@ -0,0 +1,84 @@ + + + + + + + Fl_Nice_Slider Binding Map + + + + + + +

Fl_Nice_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_Nice_SliderFLTK.Widgets.Valuators.Sliders.Nice
+ + + + + + + + + + + + + + + + +
Types
Fl_Nice_SliderNice_Slider
 Nice_Slider_Reference
+ + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Nice_Slider(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Nice_Slider;
+
 
+procedure Draw
+       (This : in out Nice_Slider);
+
 
+function Handle
+       (This  : in out Nice_Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+ + + + + diff --git a/doc/fl_png_image.html b/doc/fl_png_image.html new file mode 100644 index 0000000..25260d7 --- /dev/null +++ b/doc/fl_png_image.html @@ -0,0 +1,72 @@ + + + + + + + Fl_PNG_Image Binding Map + + + + + + +

Fl_PNG_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_PNG_ImageFLTK.Images.RGB.PNG
+ + + + + + + + + + + + + + + + +
Types
Fl_PNG_ImagePNG_Image
 PNG_Image_Reference
+ + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_PNG_Image(const char *filename);
+
+function Create
+       (Filename : in String)
+    return PNG_Image;
+
+Fl_PNG_Image(const char *name, const unsigned char *buffer, int datasize);
+
 
+ + + + + diff --git a/doc/fl_pnm_image.html b/doc/fl_pnm_image.html new file mode 100644 index 0000000..5302866 --- /dev/null +++ b/doc/fl_pnm_image.html @@ -0,0 +1,65 @@ + + + + + + + Fl_PNM_Image Binding Map + + + + + + +

Fl_PNM_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_PNM_ImageFLTK.Images.RGB.PNM
+ + + + + + + + + + + + + + + + +
Types
Fl_PNM_ImagePNM_Image
 PNM_Image_Reference
+ + + + + + + + + + + +
Functions and Procedures
+Fl_PNM_Image(const char *filename);
+
+function Create
+       (Filename : in String)
+    return PNM_Image;
+
+ + + + + diff --git a/doc/fl_rgb_image.html b/doc/fl_rgb_image.html new file mode 100644 index 0000000..95ee4e0 --- /dev/null +++ b/doc/fl_rgb_image.html @@ -0,0 +1,171 @@ + + + + + + + Fl_RGB_Image Binding Map + + + + + + +

Fl_RGB_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_RGB_ImageFLTK.Images.RGB
+ + + + + + + + + + + + + + + + +
Types
Fl_RGB_ImageRGB_Image
 RGB_Image_Reference
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0);
+
 
+Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg=FL_GRAY);
+
 
+virtual void color_average(Fl_Color c, float i);
+
+procedure Color_Average
+       (This   : in out RGB_Image;
+        Col    : in     Color;
+        Amount : in     Blend);
+
+virtual Fl_Image * copy(int W, int H);
+
+function Copy
+       (This          : in RGB_Image;
+        Width, Height : in Natural)
+    return RGB_Image'Class;
+
+Fl_Image * copy();
+
+function Copy
+       (This : in RGB_Image)
+    return RGB_Image'Class;
+
+virtual void desaturate();
+
+procedure Desaturate
+       (This : in out RGB_Image);
+
+virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
+
+procedure Draw
+       (This       : in RGB_Image;
+        X, Y, W, H : in Integer;
+        CX, CY     : in Integer := 0);
+
+void draw(int X, int Y);
+
+procedure Draw
+       (This : in RGB_Image;
+        X, Y : in Integer);
+
+virtual void label(Fl_Widget *w);
+
 
+virtual void label(Fl_Menu_Item *m);
+
 
+static void max_size(size_t size);
+
 
+static size_t max_size();
+
 
+virtual void uncache();
+
 
+ + + + + diff --git a/doc/fl_scrollbar.html b/doc/fl_scrollbar.html new file mode 100644 index 0000000..8538525 --- /dev/null +++ b/doc/fl_scrollbar.html @@ -0,0 +1,146 @@ + + + + + + + Fl_Scrollbar Binding Map + + + + + + +

Fl_Scrollbar Binding Map

+ + + + + + + + + + +
Package name
Fl_ScrollbarFLTK.Widgets.Valuators.Sliders.Scrollbars
+ + + + + + + + + + + + + + + + +
Types
Fl_ScrollbarScrollbar
 Scrollbar_Reference
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Scrollbar(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Scrollbar;
+
+void draw();
+
+procedure Draw
+       (This : in out Scrollbar);
+
+int handle(int);
+
+function Handle
+       (This  : in out Scrollbar;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+int linesize() const;
+
+function Get_Line_Size
+       (This : in Scrollbar)
+    return Natural;
+
+void linesize(int i);
+
+procedure Set_Line_Size
+       (This : in out Scrollbar;
+        To   : in     Natural);
+
+int value() const;
+
+function Get_Position
+       (This : in Scrollbar)
+    return Natural;
+
+int value(int p);
+
+procedure Set_Position
+       (This : in out Scrollbar;
+        To   : in     Natural);
+
+int value(int pos, int windowSize, int first, int total);
+
+procedure Set_All
+       (This        : in out Scrollbar;
+        Position    : in     Natural;
+        Win_Size    : in     Natural;
+        First_Line  : in     Natural;
+        Total_Lines : in     Natural);
+
+ + + + + diff --git a/doc/fl_shared_image.html b/doc/fl_shared_image.html new file mode 100644 index 0000000..298a541 --- /dev/null +++ b/doc/fl_shared_image.html @@ -0,0 +1,264 @@ + + + + + + + Fl_Shared_Image Binding Map + + + + + + +

Fl_Shared_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_Shared_ImageFLTK.Images.Shared
+ + + + + + + + + + + + + + + + +
Types
Fl_Shared_ImageShared_Image
 Shared_Image_Reference
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Shared_Image();
+
 
+Fl_Shared_Image(const char *n, Fl_Image *img=0);
+
 
+static void add_handler(Fl_Shared_Handler f);
+
 
+virtual void color_average(Fl_Color c, float i);
+
+procedure Color_Average
+       (This   : in out Shared_Image;
+        Col    : in     Color;
+        Amount : in     Blend);
+
+virtual Fl_Image * copy(int W, int H);
+
+function Copy
+       (This          : in Shared_Image;
+        Width, Height : in Natural)
+    return Shared_Image'Class;
+
+Fl_Image * copy();
+
+function Copy
+       (This : in Shared_Image)
+    return Shared_Image'Class;
+
+virtual void desaturate();
+
+procedure Desaturate
+       (This : in out Shared_Image);
+
+virtual void draw(int X, int Y, int W, int H, int cx, int cy);
+
+procedure Draw
+       (This       : in Shared_Image;
+        X, Y, W, H : in Integer;
+        CX, CY     : in Integer := 0);
+
+void draw(int X, int Y);
+
+procedure Draw
+       (This : in Shared_Image;
+        X, Y : in Integer);
+
+static Fl_Shared_Image * find(const char *name, int W=0, int H=0);
+
+function Find
+       (Name : in String;
+        W, H : in Integer := 0)
+    return Shared_Image;
+
+static Fl_Shared_Image * get(const char *name, int W=0, int H=0);
+
+function Create
+       (Filename : in String;
+        W, H     : in Integer)
+    return Shared_Image;
+
+static Fl_Shared_Image * get(Fl_RGB_Image *rgb, int own_it=1);
+
+function Create
+       (From : in FLTK.Images.RGB.RGB_Image'Class)
+    return Shared_Image;
+
+static Fl_Shared_Image ** images();
+
 
+const char * name();
+
+function Name
+       (This : in Shared_Image)
+    return String;
+
+static int num_images();
+
 
+int refcount();
+
 
+void release();
+
Used as destructor, handled automatically with Finalize procedure using Limited_Controlled types
+void reload();
+
+procedure Reload
+       (This : in out Shared_Image);
+
+static void remove_handler(Fl_Shared_Handler f);
+
 
+void scale(int width, int height, int proportional=1, int can_expand=0);
+
+procedure Scale
+       (This         : in out Shared_Image;
+        W, H         : in     Integer;
+        Proportional : in     Boolean := True;
+        Can_Expand   : in     Boolean := False);
+
+static void scaling_algorithm(Fl_RGB_Scaling algorithm);
+
+procedure Set_Scaling_Algorithm
+       (To : in Scaling_Kind);
+
+virtual void uncache();
+
 
+ + + + + diff --git a/doc/fl_slider.html b/doc/fl_slider.html new file mode 100644 index 0000000..0853595 --- /dev/null +++ b/doc/fl_slider.html @@ -0,0 +1,187 @@ + + + + + + + Fl_Slider Binding Map + + + + + + +

Fl_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_SliderFLTK.Widgets.Valuators.Sliders
+ + + + + + + + + + + + + + + + + + + + + +
Types
Fl_SliderSlider
 Slider
 Slider_Kind
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Slider(int X, int Y, int W, int H, const char *L=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Slider;
+
+Fl_Slider(uchar t, int X, int Y, int W, int H, const char *L);
+
 
+void bounds(double a, double b);
+
+procedure Set_Bounds
+       (This     : in out Slider;
+        Min, Max : in     Long_Float);
+
+void draw();
+
+procedure Draw
+       (This : in out Slider);
+
+int handle(int);
+
+function Handle
+       (This  : in out Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+int scrollvalue(int pos, int size, int first, int total);
+
+procedure Set_Scrollvalue
+       (This            : in out Slider;
+        Pos_First_Line  : in     Natural;
+        Lines_In_Window : in     Natural;
+        First_Line_Num  : in     Natural;
+        Total_Lines     : in     Natural);
+
+Fl_Boxtype slider() const;
+
+function Get_Box
+       (This : in Slider)
+    return Box_Kind;
+
+void slider(Fl_Boxtype c);
+
+procedure Set_Box
+       (This : in out Slider;
+        To   : in     Box_Kind);
+
+float slider_size() const;
+
+function Get_Slide_Size
+       (This : in Slider)
+    return Float;
+
+void slider_size(double v);
+
+procedure Set_Slide_Size
+       (This : in out Slider;
+        To   : in     Float);
+
See type() methods for Fl_Widget
+function Get_Slider_Type
+       (This : in Slider)
+    return Slider_Kind;
+
See type() methods for Fl_Widget
+procedure Set_Slider_Type
+       (This : in out Slider;
+        To   : in     Slider_Kind);
+
+ + + + + diff --git a/doc/fl_value_slider.html b/doc/fl_value_slider.html new file mode 100644 index 0000000..54bae4e --- /dev/null +++ b/doc/fl_value_slider.html @@ -0,0 +1,154 @@ + + + + + + + Fl_Value_Slider Binding Map + + + + + + +

Fl_Value_Slider Binding Map

+ + + + + + + + + + +
Package name
Fl_Value_SliderFLTK.Widgets.Valuators.Sliders.Value
+ + + + + + + + + + + + + + + + +
Types
Fl_Value_SliderValue_Slider
 Value_Slider_Reference
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Value_Slider(int x, int y, int w, int h, const char *l=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Value_Slider;
+
+void draw();
+
+procedure Draw
+       (This : in out Value_Slider);
+
+int handle(int);
+
+function Handle
+       (This  : in out Value_Slider;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
+Fl_Color textcolor() const;
+
+function Get_Text_Color
+       (This : in Value_Slider)
+    return Color;
+
+void textcolor(Fl_Color s);
+
+procedure Set_Text_Color
+       (This : in out Value_Slider;
+        To   : in     Color);
+
+Fl_Font textfont() const;
+
+function Get_Text_Font
+       (This : in Value_Slider)
+    return Font_Kind;
+
+void textfont(Fl_Font s);
+
+procedure Set_Text_Font
+       (This : in out Value_Slider;
+        To   : in     Font_Kind);
+
+Fl_Fontsize textsize() const;
+
+function Get_Text_Size
+       (This : in Value_Slider)
+    return Font_Size;
+
+void textsize(Fl_Fontsize s);
+
+procedure Set_Text_Size
+       (This : in out Value_Slider;
+        To   : in     Font_Size);
+
+ + + + + diff --git a/doc/fl_xbm_image.html b/doc/fl_xbm_image.html new file mode 100644 index 0000000..cfa3b68 --- /dev/null +++ b/doc/fl_xbm_image.html @@ -0,0 +1,65 @@ + + + + + + + Fl_XBM_Image Binding Map + + + + + + +

Fl_XBM_Image Binding Map

+ + + + + + + + + + +
Package name
Fl_XBM_ImageFLTK.Images.Bitmaps.XBM
+ + + + + + + + + + + + + + + + +
Types
Fl_XBM_ImageXBM_Image
 XBM_Image_Reference
+ + + + + + + + + + + +
Functions and Procedures
+Fl_XBM_Image(const char *filename);
+
+function Create
+       (Filename : in String)
+    return XBM_Image;
+
+ + + + + diff --git a/progress.txt b/progress.txt index 6bbb47b..2f306ca 100644 --- a/progress.txt +++ b/progress.txt @@ -12,7 +12,17 @@ Overall estimate: ???% Polished: +FLTK.Devices FLTK.Dialogs +FLTK.Images +FLTK.Images.Bitmaps +FLTK.Images.Bitmaps.XBM +FLTK.Images.RGB +FLTK.Images.RGB.BMP +FLTK.Images.RGB.JPEG +FLTK.Images.RGB.PNG +FLTK.Images.RGB.PNM +FLTK.Images.Shared FLTK.Tooltips FLTK.Widgets.Boxes FLTK.Widgets.Buttons @@ -48,26 +58,25 @@ FLTK.Widgets.Valuators.Dials FLTK.Widgets.Valuators.Dials.Fill FLTK.Widgets.Valuators.Dials.Line FLTK.Widgets.Valuators.Rollers +FLTK.Widgets.Valuators.Sliders +FLTK.Widgets.Valuators.Sliders.Fill +FLTK.Widgets.Valuators.Sliders.Hor_Fill +FLTK.Widgets.Valuators.Sliders.Hor_Nice +FLTK.Widgets.Valuators.Sliders.Horizontal +FLTK.Widgets.Valuators.Sliders.Nice +FLTK.Widgets.Valuators.Sliders.Scrollbars +FLTK.Widgets.Valuators.Sliders.Value +FLTK.Widgets.Valuators.Sliders.Horizontal Done: -FLTK.Devices FLTK.Devices.Surfaces.Copy FLTK.Devices.Surfaces.Image FLTK.Devices.Surfaces.Paged FLTK.Devices.Surfaces.Paged.Printers -FLTK.Images -FLTK.Images.Bitmaps -FLTK.Images.Bitmaps.XBM -FLTK.Images.RGB -FLTK.Images.RGB.BMP -FLTK.Images.RGB.JPEG -FLTK.Images.RGB.PNG -FLTK.Images.RGB.PNM -FLTK.Images.Shared FLTK.Widgets.Charts FLTK.Widgets.Groups.Color_Choosers FLTK.Widgets.Groups.Input_Choices @@ -81,15 +90,6 @@ FLTK.Widgets.Groups.Wizards FLTK.Widgets.Menus.Menu_Bars FLTK.Widgets.Menus.Menu_Buttons FLTK.Widgets.Progress_Bars -FLTK.Widgets.Valuators.Sliders -FLTK.Widgets.Valuators.Sliders.Fill -FLTK.Widgets.Valuators.Sliders.Hor_Fill -FLTK.Widgets.Valuators.Sliders.Hor_Nice -FLTK.Widgets.Valuators.Sliders.Horizontal -FLTK.Widgets.Valuators.Sliders.Nice -FLTK.Widgets.Valuators.Sliders.Scrollbars -FLTK.Widgets.Valuators.Sliders.Value -FLTK.Widgets.Valuators.Sliders.Value.Horizontal 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(b); } BITMAP fl_bitmap_copy(BITMAP b, int w, int h) { - return reinterpret_cast(b)->copy(w, h); + return reinterpret_cast(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(b)->draw(x, y); +} + void fl_bitmap_draw(BITMAP b, int x, int y, int w, int h, int cx, int cy) { - reinterpret_cast(b)->draw(x, y, w, h, cx, cy); + reinterpret_cast(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(s)->textcolor(); -} - -void fl_hor_value_slider_set_textcolor(HOR_VALUE_SLIDER s, unsigned int t) { - reinterpret_cast(s)->textcolor(t); -} - -int fl_hor_value_slider_get_textfont(HOR_VALUE_SLIDER s) { - return reinterpret_cast(s)->textfont(); -} - -void fl_hor_value_slider_set_textfont(HOR_VALUE_SLIDER s, int t) { - reinterpret_cast(s)->textfont(t); -} - -int fl_hor_value_slider_get_textsize(HOR_VALUE_SLIDER s) { - return reinterpret_cast(s)->textsize(); -} - -void fl_hor_value_slider_set_textsize(HOR_VALUE_SLIDER s, int t) { - reinterpret_cast(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(i); + delete reinterpret_cast(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(t)); } IMAGE fl_image_copy(IMAGE i, int w, int h) { - return reinterpret_cast(i)->copy(w, h); + // virtual so disable dispatch + return reinterpret_cast(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(i)->color_average(c, b); + // virtual so disable dispatch + reinterpret_cast(i)->Fl_Image::color_average(c, b); } void fl_image_desaturate(IMAGE i) { - reinterpret_cast(i)->desaturate(); + // virtual so disable dispatch + reinterpret_cast(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(i)->draw(x, y, w, h, cx, cy); + // virtual so disable dispatch + reinterpret_cast(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(i)->copy(w, h); + // virtual so disable dispatch + return reinterpret_cast(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(i)->color_average(c, b); + // virtual so disable dispatch + reinterpret_cast(i)->Fl_RGB_Image::color_average(c, b); } void fl_rgb_image_desaturate(RGB_IMAGE i) { - reinterpret_cast(i)->desaturate(); + // virtual so disable dispatch + reinterpret_cast(i)->Fl_RGB_Image::desaturate(); } +void fl_rgb_image_draw2(RGB_IMAGE i, int x, int y) { + reinterpret_cast(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(i)->draw(x, y, w, h, cx, cy); + // virtual so disable dispatch + reinterpret_cast(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(s)->linesize(); + return reinterpret_cast(s)->linesize(); } void fl_scrollbar_set_linesize(SCROLLBAR s, int t) { - reinterpret_cast(s)->linesize(t); + reinterpret_cast(s)->linesize(t); } int fl_scrollbar_get_value(SCROLLBAR s) { - return reinterpret_cast(s)->value(); + return reinterpret_cast(s)->value(); } void fl_scrollbar_set_value(SCROLLBAR s, int t) { - reinterpret_cast(s)->value(t); + reinterpret_cast(s)->value(t); } void fl_scrollbar_set_value2(SCROLLBAR s, int p, int w, int f, int t) { - reinterpret_cast(s)->value(p,w,f,t); + reinterpret_cast(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(r)); + return Fl_Shared_Image::get(reinterpret_cast(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(i)->copy(w, h); + // virtual so disable dispatch + return reinterpret_cast(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(i)->color_average(c, b); + // virtual so disable dispatch + reinterpret_cast(i)->Fl_Shared_Image::color_average(c, b); } void fl_shared_image_desaturate(SHARED_IMAGE i) { - reinterpret_cast(i)->desaturate(); + // virtual so disable dispatch + reinterpret_cast(i)->Fl_Shared_Image::desaturate(); } @@ -53,10 +56,6 @@ void fl_shared_image_reload(SHARED_IMAGE i) { reinterpret_cast(i)->reload(); } -void fl_shared_image_uncache(SHARED_IMAGE i) { - reinterpret_cast(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(i)->draw(x, y, w, h, cx, cy); + // virtual so disable dispatch + reinterpret_cast(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(s)->type(); +} + +void fl_slider_set_type(SLIDER s, int t) { + reinterpret_cast(s)->type(t); +} + + + + void fl_slider_set_bounds(SLIDER s, double a, double b) { reinterpret_cast(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(s)->textcolor(); + return reinterpret_cast(s)->textcolor(); } void fl_value_slider_set_textcolor(VALUE_SLIDER s, unsigned int t) { - reinterpret_cast(s)->textcolor(t); + reinterpret_cast(s)->textcolor(t); } int fl_value_slider_get_textfont(VALUE_SLIDER s) { - return reinterpret_cast(s)->textfont(); + return reinterpret_cast(s)->textfont(); } void fl_value_slider_set_textfont(VALUE_SLIDER s, int t) { - reinterpret_cast(s)->textfont(t); + reinterpret_cast(s)->textfont(t); } int fl_value_slider_get_textsize(VALUE_SLIDER s) { - return reinterpret_cast(s)->textsize(); + return reinterpret_cast(s)->textsize(); } void fl_value_slider_set_textsize(VALUE_SLIDER s, int t) { - reinterpret_cast(s)->textsize(t); + reinterpret_cast(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); @@ -80,6 +90,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; 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; + @@ -20,6 +23,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; @@ -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); @@ -114,6 +126,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; 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; + @@ -31,6 +34,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; @@ -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; -- cgit