summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-16 12:28:50 +0000
committerManolo Gouy <Manolo>2016-04-16 12:28:50 +0000
commitb0ce80f56bc0ff464277910cf0340a3162864498 (patch)
tree81d199d8450380f8e2544f81c5568021d3e61a06
parentd3e2a88c09a290f709aae843a9d4ce95ab629347 (diff)
Continue removing non window-related member-functions from class Fl_X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/Fl_Window.H2
-rw-r--r--FL/mac.H1
-rw-r--r--FL/win32.H2
-rw-r--r--FL/x.H1
-rw-r--r--src/Fl_win32.cxx42
-rw-r--r--src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx1
-rw-r--r--src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx1
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx48
8 files changed, 42 insertions, 56 deletions
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index aa0e43cb1..391ac3212 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -355,7 +355,7 @@ public:
#if defined(WIN32) && !defined(FL_DOXYGEN)
typedef struct HICON__* HICON;
// These 2 member functions break the driver model but are kept for back compatibility.
- // They are implemented in Fl_WinAPI_Window_Driver.cxx
+ // They are implemented in Fl_win32.cxx
static void default_icons(HICON big_icon, HICON small_icon);
void icons(HICON big_icon, HICON small_icon);
#endif
diff --git a/FL/mac.H b/FL/mac.H
index eabbe4271..a0e390607 100644
--- a/FL/mac.H
+++ b/FL/mac.H
@@ -158,7 +158,6 @@ public:
void destroy(void);
void set_key_window(void);
// OS X doesn't have per window icons
- static void set_default_icons(const Fl_RGB_Image*[], int) {};
void set_icons() {};
int set_cursor(Fl_Cursor);
int set_cursor(const Fl_RGB_Image*, int, int);
diff --git a/FL/win32.H b/FL/win32.H
index f887a4c6c..8b841886b 100644
--- a/FL/win32.H
+++ b/FL/win32.H
@@ -70,8 +70,6 @@ public:
void flush() {w->flush();}
void set_minmax(LPMINMAXINFO minmax);
void mapraise();
- static void set_default_icons(const Fl_RGB_Image*[], int);
- static void set_default_icons(HICON, HICON);
void set_icons();
int set_cursor(Fl_Cursor);
int set_cursor(const Fl_RGB_Image*, int, int);
diff --git a/FL/x.H b/FL/x.H
index f83c2b0ce..984391011 100644
--- a/FL/x.H
+++ b/FL/x.H
@@ -125,7 +125,6 @@ public:
static Fl_X* i(const Fl_Window* wi) {return wi->i;}
void setwindow(Fl_Window* wi) {w=wi; wi->i=this;}
void sendxjunk();
- static void set_default_icons(const Fl_RGB_Image*[], int);
void set_icons();
int set_cursor(Fl_Cursor);
int set_cursor(const Fl_RGB_Image*, int, int);
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 97e22e021..cf2a7eab1 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -2081,7 +2081,47 @@ void Fl_Window_Driver::default_icons(const Fl_RGB_Image *icons[], int count) {
default_small_icon = image_to_icon(best_small, true, 0, 0);
}
-void Fl_X::set_default_icons(HICON big_icon, HICON small_icon) {
+/** Sets the window icons using Windows' native HICON icon handles.
+
+ The given icons are copied. You can free the icons immediately after
+ this call.
+
+ \param[in] big_icon large window icon
+ \param[in] small_icon small window icon
+ */
+void Fl_Window::icons(HICON big_icon, HICON small_icon)
+{
+ free_icons();
+
+ if (big_icon != NULL)
+ ((Fl_WinAPI_Window_Driver*)pWindowDriver)->icon_->big_icon = CopyIcon(big_icon);
+ if (small_icon != NULL)
+ ((Fl_WinAPI_Window_Driver*)pWindowDriver)->icon_->small_icon = CopyIcon(small_icon);
+
+ if (Fl_X::i(this))
+ Fl_X::i(this)->set_icons();
+}
+
+/** Sets the default window icons.
+
+ Convenience function to set the default icons using Windows'
+ native HICON icon handles.
+
+ The given icons are copied. You can free the icons immediately after
+ this call.
+
+ \param[in] big_icon default large icon for all windows
+ subsequently created
+ \param[in] small_icon default small icon for all windows
+ subsequently created
+
+ \see Fl_Window::default_icon(const Fl_RGB_Image *)
+ \see Fl_Window::default_icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::icon(const Fl_RGB_Image *)
+ \see Fl_Window::icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::icons(HICON, HICON)
+ */
+void Fl_Window::default_icons(HICON big_icon, HICON small_icon) {
if (default_big_icon != NULL)
DestroyIcon(default_big_icon);
if (default_small_icon != NULL)
diff --git a/src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx b/src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx
index cdfcdb32f..9da03bceb 100644
--- a/src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx
+++ b/src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx
@@ -475,7 +475,6 @@ void Fl::get_mouse(int&, int&) { }
void Fl::set_color(Fl_Color, unsigned int) { }
int Fl_X::set_cursor(Fl_Cursor) { return 0; }
int Fl_X::set_cursor(Fl_RGB_Image const*, int, int) { return 0; }
-void Fl_X::set_default_icons(Fl_RGB_Image const**, int) { }
void Fl_X::set_icons() { }
//void Fl_Window::size_range_() { }
diff --git a/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx b/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx
index e8db6e7ce..7223e152e 100644
--- a/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx
+++ b/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx
@@ -162,7 +162,6 @@ void Fl_Graphics_Driver::global_gc() { }
void Fl::set_color(Fl_Color, unsigned int) { }
int Fl_X::set_cursor(Fl_Cursor) { return 0; }
int Fl_X::set_cursor(Fl_RGB_Image const*, int, int) { return 0; }
-void Fl_X::set_default_icons(Fl_RGB_Image const**, int) { }
void Fl_X::set_icons() { }
//void Fl_Window::size_range_() { }
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
index d23a00432..61cc6bcbf 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
@@ -360,54 +360,6 @@ void Fl_WinAPI_Window_Driver::free_icons() {
}
-#if !defined(FL_DOXYGEN) // FIXME - silence Doxygen warnings
-
-/** Sets the window icons using Windows' native HICON icon handles.
-
- The given icons are copied. You can free the icons immediately after
- this call.
-
- \param[in] big_icon large window icon
- \param[in] small_icon small window icon
- */
-void Fl_Window::icons(HICON big_icon, HICON small_icon)
-{
- free_icons();
-
- if (big_icon != NULL)
- ((Fl_WinAPI_Window_Driver*)pWindowDriver)->icon_->big_icon = CopyIcon(big_icon);
- if (small_icon != NULL)
- ((Fl_WinAPI_Window_Driver*)pWindowDriver)->icon_->small_icon = CopyIcon(small_icon);
-
- if (Fl_X::i(this))
- Fl_X::i(this)->set_icons();
-}
-
-/** Sets the default window icons.
-
- Convenience function to set the default icons using Windows'
- native HICON icon handles.
-
- The given icons are copied. You can free the icons immediately after
- this call.
-
- \param[in] big_icon default large icon for all windows
- subsequently created
- \param[in] small_icon default small icon for all windows
- subsequently created
-
- \see Fl_Window::default_icon(const Fl_RGB_Image *)
- \see Fl_Window::default_icons(const Fl_RGB_Image *[], int)
- \see Fl_Window::icon(const Fl_RGB_Image *)
- \see Fl_Window::icons(const Fl_RGB_Image *[], int)
- \see Fl_Window::icons(HICON, HICON)
- */
-void Fl_Window::default_icons(HICON big_icon, HICON small_icon) {
- Fl_X::set_default_icons(big_icon, small_icon);
-}
-
-#endif // !defined(FL_DOXYGEN) // FIXME - silence Doxygen warnings
-
void Fl_WinAPI_Window_Driver::wait_for_expose() {
if (!shown()) return;
Fl_X *i = Fl_X::i(pWindow);