mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 01:10:23 +00:00
Adds _ACCEPTFILEDROP as a function to return true (-1) if active/enabled.
Returns 0 otherwise.
This commit is contained in:
parent
ce2d3d4a2f
commit
5e0ff36205
|
@ -233,6 +233,7 @@ int32 force_display_update=0;
|
||||||
void sub__delay(double seconds);
|
void sub__delay(double seconds);
|
||||||
|
|
||||||
void *generic_window_handle=NULL;
|
void *generic_window_handle=NULL;
|
||||||
|
int32 acceptFileDrop=0;
|
||||||
#ifdef QB64_WINDOWS
|
#ifdef QB64_WINDOWS
|
||||||
HWND window_handle=NULL;
|
HWND window_handle=NULL;
|
||||||
HDROP hdrop=NULL;
|
HDROP hdrop=NULL;
|
||||||
|
@ -26507,13 +26508,21 @@ void sub__echo(qbs *message){
|
||||||
|
|
||||||
void sub__filedrop(int32 on_off=NULL) {
|
void sub__filedrop(int32 on_off=NULL) {
|
||||||
#ifdef QB64_WINDOWS
|
#ifdef QB64_WINDOWS
|
||||||
if ((on_off==NULL)||(on_off==1))
|
if ((on_off==NULL)||(on_off==1)) {
|
||||||
DragAcceptFiles((HWND)func__handle(), TRUE);
|
DragAcceptFiles((HWND)func__handle(), TRUE);
|
||||||
if ((on_off==2))
|
acceptFileDrop=-1;
|
||||||
|
}
|
||||||
|
if ((on_off==2)) {
|
||||||
DragAcceptFiles((HWND)func__handle(), FALSE);
|
DragAcceptFiles((HWND)func__handle(), FALSE);
|
||||||
|
acceptFileDrop=0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32 func__filedrop() {
|
||||||
|
return acceptFileDrop;
|
||||||
|
}
|
||||||
|
|
||||||
void sub__finishdrop() {
|
void sub__finishdrop() {
|
||||||
#ifdef QB64_WINDOWS
|
#ifdef QB64_WINDOWS
|
||||||
DragFinish(hdrop);
|
DragFinish(hdrop);
|
||||||
|
|
|
@ -100,6 +100,7 @@ uint8**out_data,int32*out_x,int32 *out_y,int32*out_x_pre_increment,int32*out_x_p
|
||||||
extern void sub__title(qbs *title);
|
extern void sub__title(qbs *title);
|
||||||
extern void sub__echo(qbs *message);
|
extern void sub__echo(qbs *message);
|
||||||
extern void sub__finishdrop();
|
extern void sub__finishdrop();
|
||||||
|
extern int32 func__filedrop();
|
||||||
extern void sub__filedrop(int32 on_off=NULL);
|
extern void sub__filedrop(int32 on_off=NULL);
|
||||||
extern int32 func__totaldroppedfiles();
|
extern int32 func__totaldroppedfiles();
|
||||||
extern qbs *func__droppedfile(int32 fileIndex, int32 passed);
|
extern qbs *func__droppedfile(int32 fileIndex, int32 passed);
|
||||||
|
|
|
@ -908,6 +908,14 @@ id.specialformat = "[{ON|OFF}]"
|
||||||
id.NoCloud = 1
|
id.NoCloud = 1
|
||||||
regid
|
regid
|
||||||
|
|
||||||
|
clearid
|
||||||
|
id.n = "_ACCEPTFILEDROP"
|
||||||
|
id.subfunc = 1
|
||||||
|
id.callname = "func__filedrop"
|
||||||
|
id.ret = LONGTYPE - ISPOINTER
|
||||||
|
id.NoCloud = 1
|
||||||
|
regid
|
||||||
|
|
||||||
clearid
|
clearid
|
||||||
id.n = "_FINISHDROP"
|
id.n = "_FINISHDROP"
|
||||||
id.subfunc = 2
|
id.subfunc = 2
|
||||||
|
|
Loading…
Reference in a new issue