Cocoa/DND : added bitmap data type handling in drag'n'drop operations
[blender-staging.git] / intern / ghost / intern / GHOST_EventDragnDrop.h
index 85c18efb118aba3151b94dcce4d26e603b22d6ed..31d3545e484f436ecb4595ff22a3f8404d3b9a93 100644 (file)
 #define _GHOST_EVENT_DRAGNDROP_H_
 
 #include "GHOST_Event.h"
+extern "C" {
+#include "IMB_imbuf.h"
+#include "IMB_imbuf_types.h"
+};
 
 /**
  * Drag & drop event
@@ -55,7 +59,7 @@
  * <br>Currently supported object types :
  * <li>UTF-8 string
  * <li>array of strings representing filenames (GHOST_TStringArray)
- * <li>bitmap image
+ * <li>bitmap ImBuf
  */
 class GHOST_EventDragnDrop : public GHOST_Event
 {
@@ -89,7 +93,7 @@ public:
                
                switch (m_dragnDropEventData.dataType) {
                        case GHOST_kDragnDropTypeBitmap:
-                               //Not currently implemented
+                               IMB_freeImBuf((ImBuf*)m_dragnDropEventData.data);
                                break;
                        case GHOST_kDragnDropTypeFilenames:
                        {