diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-03-29 10:35:00 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-03-29 10:35:00 +0000 |
| commit | 941901e273319ce152523af7fa079a6f5cf89d68 (patch) | |
| tree | 9d70b82fa54d81607a0022f14a0518c47805a796 /src/fl_dnd_mac.cxx | |
| parent | b77071a3de3593ea482aa7ea0a442c7fc888a2e2 (diff) | |
OS X: removed all Carbon and Quickdraw references. Starting with 1.3, we only support Cocoa and Quartz.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_dnd_mac.cxx')
| -rw-r--r-- | src/fl_dnd_mac.cxx | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/fl_dnd_mac.cxx b/src/fl_dnd_mac.cxx index 9928e4b9f..01f9676f0 100644 --- a/src/fl_dnd_mac.cxx +++ b/src/fl_dnd_mac.cxx @@ -46,48 +46,8 @@ extern int fl_selection_length; */ int Fl::dnd() { -#ifdef __APPLE_COCOA__ extern int MACpreparedrag(void); return MACpreparedrag(); -#else - - OSErr result; - DragReference dragRef; - result = NewDrag( &dragRef ); - if ( result != noErr ) return false; - - result = AddDragItemFlavor( dragRef, 1, 'utf8', fl_selection_buffer, fl_selection_length, 0 ); - if ( result != noErr ) { DisposeDrag( dragRef ); return false; } - - Point mp; - GetMouse(&mp); - LocalToGlobal( &mp ); - RgnHandle region = NewRgn(); - SetRectRgn( region, mp.h-10, mp.v-10, mp.h+10, mp.v+10 ); - RgnHandle r2 = NewRgn(); - SetRectRgn( r2, mp.h-8, mp.v-8, mp.h+8, mp.v+8 ); - DiffRgn( region, r2, region ); - DisposeRgn( r2 ); - - EventRecord event; - ConvertEventRefToEventRecord( fl_os_event, &event ); - result = TrackDrag( dragRef, &event, region ); - - Fl_Widget *w = Fl::pushed(); - if ( w ) - { - int old_event = Fl::e_number; - w->handle(Fl::e_number = FL_RELEASE); - Fl::e_number = old_event; - Fl::pushed( 0 ); - } - - if ( result != noErr ) { DisposeRgn( region ); DisposeDrag( dragRef ); return false; } - - DisposeRgn( region ); - DisposeDrag( dragRef ); - return true; -#endif //__APPLE_COCOA__ } |
