Drag&Drop support; SDL_CaptureMode support; Maximize window support;

This commit is contained in:
Yanrishatum
2015-10-18 00:15:05 +03:00
committed by Joshua Granick
parent 3a7d8b80e5
commit 85ec75fd59
18 changed files with 256 additions and 10 deletions

View File

@@ -0,0 +1,47 @@
#include <hx/CFFI.h>
#include <ui/DropEvent.h>
namespace lime {
AutoGCRoot* DropEvent::callback = 0;
AutoGCRoot* DropEvent::eventObject = 0;
static int id_file;
static int id_type;
static bool init = false;
DropEvent::DropEvent () {
type = DROP_FILE;
}
void DropEvent::Dispatch (DropEvent* event) {
if (DropEvent::callback)
{
if (!init)
{
id_file = val_id("file");
id_type = val_id("type");
init = true;
}
value object = (DropEvent::eventObject ? DropEvent::eventObject->get() : alloc_empty_object());
alloc_field(object, id_file, alloc_string(event->file));
alloc_field(object, id_type, alloc_int (event->type));
val_call0 (DropEvent::callback->get ());
}
}
}