From b4438b2fbe895694be98e6e8426103deefc51448 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Tue, 21 Jan 2025 21:04:54 +1300 Subject: Split public API and private implementation files into different directories --- body/c_fl_shared_image.cpp | 100 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 body/c_fl_shared_image.cpp (limited to 'body/c_fl_shared_image.cpp') diff --git a/body/c_fl_shared_image.cpp b/body/c_fl_shared_image.cpp new file mode 100644 index 0000000..bb17632 --- /dev/null +++ b/body/c_fl_shared_image.cpp @@ -0,0 +1,100 @@ + + +// Programmed by Jedidiah Barber +// Released into the public domain + + +#include +#include +#include "c_fl_shared_image.h" + + + + +SHAREDIMAGE fl_shared_image_get(const char * f, int w, int h) { + return Fl_Shared_Image::get(f, w, h); +} + +SHAREDIMAGE fl_shared_image_get2(void * r) { + return Fl_Shared_Image::get(static_cast(r), 0); +} + +SHAREDIMAGE fl_shared_image_find(const char * n, int w, int h) { + return Fl_Shared_Image::find(n, w, h); +} + +void fl_shared_image_release(SHAREDIMAGE i) { + static_cast(i)->release(); +} + +SHAREDIMAGE fl_shared_image_copy(SHAREDIMAGE i, int w, int h) { + // virtual so disable dispatch + return static_cast(i)->Fl_Shared_Image::copy(w, h); +} + +SHAREDIMAGE fl_shared_image_copy2(SHAREDIMAGE i) { + return static_cast(i)->copy(); +} + + + + +void fl_shared_image_color_average(SHAREDIMAGE i, int c, float b) { + // virtual so disable dispatch + static_cast(i)->Fl_Shared_Image::color_average(c, b); +} + +void fl_shared_image_desaturate(SHAREDIMAGE i) { + // virtual so disable dispatch + static_cast(i)->Fl_Shared_Image::desaturate(); +} + + + + +int fl_shared_image_num_images() { + return Fl_Shared_Image::num_images(); +} + +const char * fl_shared_image_name(SHAREDIMAGE i) { + return static_cast(i)->name(); +} + +int fl_shared_image_original(SHAREDIMAGE i) { + return static_cast(i)->original(); +} + +int fl_shared_image_refcount(SHAREDIMAGE i) { + return static_cast(i)->refcount(); +} + +void fl_shared_image_reload(SHAREDIMAGE i) { + static_cast(i)->reload(); +} + +void fl_shared_image_uncache(SHAREDIMAGE i) { + // virtual so disable dispatch + static_cast(i)->uncache(); +} + + + + +void fl_shared_image_scaling_algorithm(int v) { + Fl_Shared_Image::scaling_algorithm(static_cast(v)); +} + +void fl_shared_image_scale(SHAREDIMAGE i, int w, int h, int p, int e) { + static_cast(i)->scale(w, h, p, e); +} + +void fl_shared_image_draw(SHAREDIMAGE i, int x, int y, int w, int h, int cx, int cy) { + // virtual so disable dispatch + static_cast(i)->Fl_Shared_Image::draw(x, y, w, h, cx, cy); +} + +void fl_shared_image_draw2(SHAREDIMAGE i, int x, int y) { + static_cast(i)->draw(x, y); +} + + -- cgit