summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-06 18:53:10 +0000
committerManolo Gouy <Manolo>2016-03-06 18:53:10 +0000
commit09cc0a9aab8190af9b07237e10b570f441fa8a9a (patch)
tree746d45ab843ef1992bae94293fe73c9c8a168cc6 /src
parent5c1e50b128f7c6b3c6bfee74a9d625cbbd103277 (diff)
Build with SDL driver needs to know also the Fl_Image_Surface class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/drivers/SDL/Fl_SDL_Copy_Surface.H14
-rw-r--r--src/drivers/SDL/Fl_SDL_Image_Surface.H15
-rw-r--r--src/drivers/SDL/Fl_SDL_Image_Surface.cxx1
4 files changed, 32 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2dca3db10..2751947b5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -216,6 +216,7 @@ elseif (USE_SDL)
drivers/SDL/Fl_SDL_Window_Driver.cxx
drivers/SDL/Fl_SDL_Graphics_Driver.cxx
drivers/SDL/Fl_SDL_Copy_Surface.cxx
+ drivers/SDL/Fl_SDL_Image_Surface.cxx
)
set(DRIVER_HEADER_FILES
drivers/Pico/Fl_Pico_System_Driver.H
@@ -228,6 +229,7 @@ elseif (USE_SDL)
drivers/SDL/Fl_SDL_Window_Driver.H
drivers/SDL/Fl_SDL_Graphics_Driver.H
drivers/SDL/Fl_SDL_Copy_Surface.H
+ drivers/SDL/Fl_SDL_Image_Surface.H
)
elseif (APPLE)
diff --git a/src/drivers/SDL/Fl_SDL_Copy_Surface.H b/src/drivers/SDL/Fl_SDL_Copy_Surface.H
index 8b1378917..9b3742023 100644
--- a/src/drivers/SDL/Fl_SDL_Copy_Surface.H
+++ b/src/drivers/SDL/Fl_SDL_Copy_Surface.H
@@ -1 +1,15 @@
+class Fl_Copy_Surface::Helper : public Fl_Widget_Surface { // class model
+ friend class Fl_Copy_Surface;
+private:
+ int width;
+ int height;
+ Helper(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) {} // to implement
+ ~Helper() {} // to implement
+ void set_current(){} // to implement
+ void translate(int x, int y) {} // to implement
+ void untranslate() {} // to implement
+ int w() {return width;}
+ int h() {return height;}
+ int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
+};
diff --git a/src/drivers/SDL/Fl_SDL_Image_Surface.H b/src/drivers/SDL/Fl_SDL_Image_Surface.H
new file mode 100644
index 000000000..05202afdd
--- /dev/null
+++ b/src/drivers/SDL/Fl_SDL_Image_Surface.H
@@ -0,0 +1,15 @@
+class Fl_Image_Surface::Helper : public Fl_Widget_Surface { // class model
+ friend class Fl_Image_Surface;
+public:
+ Fl_Offscreen offscreen;
+ int width;
+ int height;
+ Helper(int w, int h, int high_res) : Fl_Widget_Surface(NULL), width(w), height(h) {} // to implement
+ ~Helper() {} // to implement
+ void set_current(){} // to implement
+ void translate(int x, int y) {} // to implement
+ void untranslate() {} // to implement
+ Fl_RGB_Image *image() {} // to implement
+ void end_current() {} // to implement
+ int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
+};
diff --git a/src/drivers/SDL/Fl_SDL_Image_Surface.cxx b/src/drivers/SDL/Fl_SDL_Image_Surface.cxx
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/src/drivers/SDL/Fl_SDL_Image_Surface.cxx
@@ -0,0 +1 @@
+