comparison Framework/Viewport/IViewport.h @ 1045:6a9300ecfa13

tests for context loss are now restricted to WebAssembly
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Oct 2019 17:17:56 +0200
parents a7351ad54960
children 32b403a47b19
comparison
equal deleted inserted replaced
1044:b60d70e8b55c 1045:6a9300ecfa13
44 44
45 virtual unsigned int GetCanvasWidth() const = 0; 45 virtual unsigned int GetCanvasWidth() const = 0;
46 46
47 virtual unsigned int GetCanvasHeight() const = 0; 47 virtual unsigned int GetCanvasHeight() const = 0;
48 48
49 // TODO - Is this needed at this level (e.g. for SDL)?
49 virtual const std::string& GetCanvasIdentifier() const = 0; 50 virtual const std::string& GetCanvasIdentifier() const = 0;
50 51
51 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) const = 0; 52 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) const = 0;
52
53 virtual bool IsContextLost() = 0;
54
55 virtual void* DebugGetInternalContext() const = 0;
56 53
57 #if ORTHANC_ENABLE_LOCALE == 1 54 #if ORTHANC_ENABLE_LOCALE == 1
58 virtual void SetFont(size_t index, 55 virtual void SetFont(size_t index,
59 Orthanc::EmbeddedResources::FileResourceId resource, 56 Orthanc::EmbeddedResources::FileResourceId resource,
60 unsigned int fontSize, 57 unsigned int fontSize,
61 Orthanc::Encoding codepage) = 0; 58 Orthanc::Encoding codepage) = 0;
62 #endif 59 #endif
63 60
64 protected: 61 protected:
62 // TODO - Replace this by "ICompositor& GetCompositor()"
65 virtual ICompositor* GetCompositor() = 0; 63 virtual ICompositor* GetCompositor() = 0;
66 64
67 virtual const ICompositor* GetCompositor() const 65 virtual const ICompositor* GetCompositor() const
68 { 66 {
69 IViewport* self = const_cast<IViewport*>(this); 67 IViewport* self = const_cast<IViewport*>(this);