From b271012d04897f788866760c1dea7d51b1b44a4d Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 28 Sep 2016 13:08:10 +0200 Subject: wx: Add simple dropfiles support Added wxDropFiles event --- lib/wx/c_src/gen/wxe_events.cpp | 15 ++++++++++++++- lib/wx/c_src/gen/wxe_funcs.cpp | 22 ++++++++++++++++++++++ lib/wx/c_src/gen/wxe_macros.h | 3 +++ 3 files changed, 39 insertions(+), 1 deletion(-) (limited to 'lib/wx/c_src') diff --git a/lib/wx/c_src/gen/wxe_events.cpp b/lib/wx/c_src/gen/wxe_events.cpp index 4affe2ba53..b6d3c2db18 100644 --- a/lib/wx/c_src/gen/wxe_events.cpp +++ b/lib/wx/c_src/gen/wxe_events.cpp @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2015. All Rights Reserved. + * Copyright Ericsson AB 2008-2016. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -306,6 +306,7 @@ void initEventTable() {wxEVT_ACTIVATE_APP, 232, "activate_app"}, {wxEVT_HIBERNATE, 232, "hibernate"}, {wxEVT_MOUSE_CAPTURE_LOST, 235, "mouse_capture_lost"}, + {wxEVT_DROP_FILES, 238, "drop_files"}, {-1, 0, } }; for(int i=0; event_types[i].ev_type != -1; i++) { @@ -880,6 +881,18 @@ case 235: {// wxMouseCaptureLostEvent rt.addAtom(Etype->eName); rt.addTupleCount(2); break; +} +case 238: {// wxDropFilesEvent + wxDropFilesEvent * ev = (wxDropFilesEvent *) event; + evClass = (char*)"wxDropFilesEvent"; + rt.addAtom((char*)"wxDropFiles"); + rt.addAtom(Etype->eName); + rt.addInt(ev->m_noFiles); + rt.add(ev->m_pos); + wxArrayString tmpArrayStr(ev->m_noFiles, ev->m_files); + rt.add(tmpArrayStr); + rt.addTupleCount(5); + break; } } diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index 4243d8a35a..610b0a2558 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -32048,6 +32048,28 @@ case wxDCOverlay_Clear: { // wxDCOverlay::Clear if(!This) throw wxe_badarg(0); This->Clear(); break; +} +case wxDropFilesEvent_GetPosition: { // wxDropFilesEvent::GetPosition + wxDropFilesEvent *This = (wxDropFilesEvent *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + wxPoint Result = This->GetPosition(); + rt.add(Result); + break; +} +case wxDropFilesEvent_GetNumberOfFiles: { // wxDropFilesEvent::GetNumberOfFiles + wxDropFilesEvent *This = (wxDropFilesEvent *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + int Result = This->GetNumberOfFiles(); + rt.addInt(Result); + break; +} +case wxDropFilesEvent_GetFiles: { // wxDropFilesEvent::GetFiles + wxDropFilesEvent *This = (wxDropFilesEvent *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + wxString * Result = (wxString*)This->GetFiles(); + wxArrayString tmpArrayStr(This->m_noFiles, Result); + rt.add(tmpArrayStr); + break; } default: { wxeReturn error = wxeReturn(WXE_DRV_PORT, Ecmd.caller, false); error.addAtom("_wxe_error_"); diff --git a/lib/wx/c_src/gen/wxe_macros.h b/lib/wx/c_src/gen/wxe_macros.h index 82b39b49cd..e7fb4cdfc6 100644 --- a/lib/wx/c_src/gen/wxe_macros.h +++ b/lib/wx/c_src/gen/wxe_macros.h @@ -3421,5 +3421,8 @@ #define wxDCOverlay_new_2 3592 #define wxDCOverlay_destruct 3593 #define wxDCOverlay_Clear 3594 +#define wxDropFilesEvent_GetPosition 3595 +#define wxDropFilesEvent_GetNumberOfFiles 3596 +#define wxDropFilesEvent_GetFiles 3597 -- cgit v1.2.3