mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Expose drag image via CefDragData (issue #1715)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/image_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/stream_writer_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
@@ -372,6 +373,48 @@ void CefDragDataCToCpp::AddFile(const CefString& path,
|
||||
display_name.GetStruct());
|
||||
}
|
||||
|
||||
CefRefPtr<CefImage> CefDragDataCToCpp::GetImage() {
|
||||
cef_drag_data_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_image))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_image_t* _retval = _struct->get_image(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefImageCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefPoint CefDragDataCToCpp::GetImageHotspot() {
|
||||
cef_drag_data_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_image_hotspot))
|
||||
return CefPoint();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_point_t _retval = _struct->get_image_hotspot(_struct);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefDragDataCToCpp::HasImage() {
|
||||
cef_drag_data_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, has_image))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->has_image(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
|
Reference in New Issue
Block a user