2018-05-13 08:28:47 -07:00
|
|
|
import efl_object;
|
2018-03-06 03:49:51 -08:00
|
|
|
|
2019-07-30 06:36:32 -07:00
|
|
|
function @beta EflThreadIOCall {
|
2019-09-18 03:51:40 -07:00
|
|
|
[[ A Function to call on the "other end" of a thread object ]]
|
2018-03-06 03:49:51 -08:00
|
|
|
params {
|
2019-09-18 03:51:40 -07:00
|
|
|
@in event: const(event); [[Event struct with an EFL_LOOP_HANDLER_CLASS as info]]
|
2018-03-06 03:49:51 -08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-07-30 06:36:32 -07:00
|
|
|
function @beta EflThreadIOCallSync {
|
2019-09-18 03:51:40 -07:00
|
|
|
[[ A Function to call on the "other end" of a thread object ]]
|
2018-03-06 03:49:51 -08:00
|
|
|
params {
|
2019-09-18 03:51:40 -07:00
|
|
|
@in event: const(event); [[Event struct with an EFL_LOOP_HANDLER_CLASS as info]]
|
2018-03-06 03:49:51 -08:00
|
|
|
}
|
2019-09-18 03:51:40 -07:00
|
|
|
return: void_ptr; [[The "other end" of a thread object's data]]
|
2018-03-06 03:49:51 -08:00
|
|
|
};
|
|
|
|
|
2019-02-14 08:37:02 -08:00
|
|
|
mixin @beta Efl.ThreadIO
|
2018-03-06 03:49:51 -08:00
|
|
|
{
|
2019-09-18 03:51:40 -07:00
|
|
|
[[This adds a simple indata and outdata void ptr to begin that you can
|
|
|
|
set on @Efl.Thread objects (set the indata) and get the outdata too to
|
|
|
|
get results. then on the efl.appthread side the indata is set on the
|
|
|
|
@Efl.Appthread before it runs and on quit the thread can set the
|
|
|
|
outdata on the appthread, and this appears back on the @Efl.Thread
|
|
|
|
object in the parent thread.
|
|
|
|
|
|
|
|
So you can basically share pointers to anything in and out this way on
|
|
|
|
start/exit in addition to string args etc.
|
|
|
|
]]
|
2018-03-06 03:49:51 -08:00
|
|
|
methods {
|
|
|
|
@property indata {
|
2019-09-18 03:51:40 -07:00
|
|
|
[[Sets/gets on Efl.Thread object's indata.]]
|
2018-03-06 03:49:51 -08:00
|
|
|
set { }
|
|
|
|
get { }
|
|
|
|
values {
|
2019-09-18 03:51:40 -07:00
|
|
|
data: void_ptr; [[Pointer data set to indata.]]
|
2018-03-06 03:49:51 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property outdata {
|
2019-09-18 03:51:40 -07:00
|
|
|
[[Sets/gets on Efl.Thread object's outdata.]]
|
2018-03-06 03:49:51 -08:00
|
|
|
set { }
|
|
|
|
get { }
|
|
|
|
values {
|
2019-09-18 03:51:40 -07:00
|
|
|
data: void_ptr; [[Pointer data set to outdata.]]
|
2018-03-06 03:49:51 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
call {
|
2019-09-18 03:51:40 -07:00
|
|
|
[[Write a command as async.]]
|
2018-03-06 03:49:51 -08:00
|
|
|
params {
|
2019-09-18 03:51:40 -07:00
|
|
|
func: EflThreadIOCall; [[A Function to call on the "other end" of a thread object]]
|
2018-03-06 03:49:51 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
call_sync {
|
2019-09-18 03:51:40 -07:00
|
|
|
[[Write a command as sync.]]
|
2018-03-06 03:49:51 -08:00
|
|
|
params {
|
2019-09-18 03:51:40 -07:00
|
|
|
func: EflThreadIOCallSync; [[A Function to call on the "other end" of a thread object]]
|
2018-03-06 03:49:51 -08:00
|
|
|
}
|
2019-09-18 03:51:40 -07:00
|
|
|
return: void_ptr; [[The "other end" of a thread object's data]]
|
2018-03-06 03:49:51 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
events {
|
|
|
|
}
|
|
|
|
implements {
|
|
|
|
}
|
|
|
|
}
|