Mercurial > hg > orthanc-stone
diff Applications/Generic/GuiAdapter.cpp @ 937:86ac61a040c9
Added getters and notifications to allow clients of the loaders (DicomStructureSetLoader, OrthancSeriesVolumeProgressiveLoader and OrthancMultiframeVolumeLoader) to know when the loading is finished + added ability for SDL event loop to execute a callback repeatedly (used to check the view loading state)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 31 Jul 2019 10:24:09 +0200 |
parents | 912cc77be3b4 |
children | 1091b2adeb5a |
line wrap: on
line diff
--- a/Applications/Generic/GuiAdapter.cpp Mon Jul 29 15:39:45 2019 +0200 +++ b/Applications/Generic/GuiAdapter.cpp Wed Jul 31 10:24:09 2019 +0200 @@ -51,7 +51,7 @@ } #if ORTHANC_ENABLE_WASM == 1 - void GuiAdapter::Run() + void GuiAdapter::Run(GuiAdapterRunFunc /*func*/, void* /*cookie*/) { } @@ -723,7 +723,7 @@ # endif // SDL ONLY - void GuiAdapter::Run() + void GuiAdapter::Run(GuiAdapterRunFunc func, void* cookie) { #if 1 // TODO: MAKE THIS DYNAMIC !!! See SdlOpenGLViewport vs Cairo in ViewportWrapper @@ -741,6 +741,8 @@ { { LockingEmitter::WriterLock lock(lockingEmitter_); + if(func != NULL) + (*func)(cookie); OnAnimationFrame(); // in SDL we must call it }