summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-10 15:01:22 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-10 15:01:22 +0000
commit06a23813f86e47144b7075852a6f4c299996ce9f (patch)
tree6540caf7682482b8ddf20b46b90b578b4e30590d
parenta84320659b1a7966b17206ac4c74622631a7c02f (diff)
Wrap remaining DnD includes and code for WIN32 (Cygwin with GCC 2.x
won't work) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2065 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_win32.cxx24
-rw-r--r--src/fl_dnd_win32.cxx10
2 files changed, 21 insertions, 13 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 0021a0347..810661546 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx,v 1.33.2.37.2.24 2002/04/09 21:17:01 easysw Exp $"
+// "$Id: Fl_win32.cxx,v 1.33.2.37.2.25 2002/04/10 15:01:20 easysw Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -45,8 +45,12 @@
#include <ctype.h>
#include <winuser.h>
#include <commctrl.h>
-#include <ole2.h>
-#include <ShellApi.h>
+
+// The following include files require GCC 3.x or a non-GNU compiler...
+#if !defined(__GNUC__) || __GNUC__ >= 3
+# include <ole2.h>
+# include <ShellApi.h>
+#endif // !__GNUC__ || __GNUC__ >= 3
//
@@ -1026,11 +1030,15 @@ Fl_X* Fl_X::make(Fl_Window* w) {
// other windows from the code, or we loose the capture.
ShowWindow(x->xid, !showit ? SW_SHOWMINNOACTIVE :
(Fl::grab() || (style & WS_POPUP)) ? SW_SHOWNOACTIVATE : SW_SHOWNORMAL);
- // register all windows for potential drag'n'drop operations
- { static char oleInitialized = 0;
- if (!oleInitialized) { OleInitialize(0L); oleInitialized=1; }
- }
+
+ // Drag-n-drop requires GCC 3.x or a non-GNU compiler...
+#if !defined(__GNUC__) || __GNUC__ >= 3
+ // Register all windows for potential drag'n'drop operations
+ static char oleInitialized = 0;
+ if (!oleInitialized) { OleInitialize(0L); oleInitialized=1; }
+
RegisterDragDrop(x->xid, (IDropTarget*)&flDropTarget);
+#endif // !__GNUC__ || __GNUC__ >= 3
if (w->modal()) {Fl::modal_ = w; fl_fix_focus();}
return x;
@@ -1162,5 +1170,5 @@ void Fl_Window::make_current() {
}
//
-// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.24 2002/04/09 21:17:01 easysw Exp $".
+// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.25 2002/04/10 15:01:20 easysw Exp $".
//
diff --git a/src/fl_dnd_win32.cxx b/src/fl_dnd_win32.cxx
index e510e7dfa..a1e74f777 100644
--- a/src/fl_dnd_win32.cxx
+++ b/src/fl_dnd_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_dnd_win32.cxx,v 1.5.2.5 2002/04/09 20:36:28 easysw Exp $"
+// "$Id: fl_dnd_win32.cxx,v 1.5.2.6 2002/04/10 15:01:22 easysw Exp $"
//
// Drag & Drop code for the Fast Light Tool Kit (FLTK).
//
@@ -43,9 +43,6 @@
#endif
#include <ctype.h>
-#include <ole2.h>
-#include <ShellAPI.h>
-
extern char *fl_selection_buffer[2];
extern int fl_selection_length[2];
extern int fl_selection_buffer_length[2];
@@ -56,6 +53,9 @@ Fl_Window *fl_dnd_target_window = 0;
// All of the following code requires GCC 3.x or a non-GNU compiler...
#if !defined(__GNUC__) || __GNUC__ >= 3
+#include <ole2.h>
+#include <ShellAPI.h>
+
/**
* subclass the IDropTarget to receive data from DnD operations
*/
@@ -349,5 +349,5 @@ int Fl::dnd()
//
-// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.5 2002/04/09 20:36:28 easysw Exp $".
+// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.6 2002/04/10 15:01:22 easysw Exp $".
//