Mercurial > hg > orthanc-stone
comparison Applications/Generic/GuiAdapter.h @ 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 | 401808e7ff2e |
children | ac88989817e3 |
comparison
equal
deleted
inserted
replaced
936:775ebd43bd3b | 937:86ac61a040c9 |
---|---|
216 | 216 |
217 # endif | 217 # endif |
218 | 218 |
219 #endif | 219 #endif |
220 | 220 |
221 typedef void (*GuiAdapterRunFunc)(void*); | |
222 | |
221 class GuiAdapter | 223 class GuiAdapter |
222 { | 224 { |
223 public: | 225 public: |
224 #if ORTHANC_ENABLE_THREADS == 1 | 226 #if ORTHANC_ENABLE_THREADS == 1 |
225 GuiAdapter(LockingEmitter& lockingEmitter) : lockingEmitter_(lockingEmitter) | 227 GuiAdapter(LockingEmitter& lockingEmitter) : lockingEmitter_(lockingEmitter) |
274 /** | 276 /** |
275 Under SDL, this function does NOT return until all windows have been closed. | 277 Under SDL, this function does NOT return until all windows have been closed. |
276 Under wasm, it returns without doing anything, since the event loop is managed | 278 Under wasm, it returns without doing anything, since the event loop is managed |
277 by the browser. | 279 by the browser. |
278 */ | 280 */ |
279 void Run(); | 281 void Run(GuiAdapterRunFunc func = NULL, void* cookie = NULL); |
280 | 282 |
281 #if ORTHANC_ENABLE_WASM != 1 | 283 #if ORTHANC_ENABLE_WASM != 1 |
282 /** | 284 /** |
283 This method must be called in order for callback handler to be allowed to | 285 This method must be called in order for callback handler to be allowed to |
284 be registered. | 286 be registered. |