comparison Framework/Viewport/SdlWindow.h @ 1198:4cc997207d8a broker

fix compatibility between SDL and DCMTK
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 28 Nov 2019 17:13:33 +0100
parents efc5b62b9539
children 6009c59d8676
comparison
equal deleted inserted replaced
1195:bdc6837d5917 1198:4cc997207d8a
21 21
22 #pragma once 22 #pragma once
23 23
24 #if ORTHANC_ENABLE_SDL == 1 24 #if ORTHANC_ENABLE_SDL == 1
25 25
26 #include <SDL_render.h>
27 #include <SDL_video.h>
28 #include <boost/noncopyable.hpp> 26 #include <boost/noncopyable.hpp>
27
28 // Forward declaration of SDL type to avoid clashes with DCMTK headers
29 // on "typedef Sint8", in "StoneInitialization.cpp"
30 struct SDL_Window;
31 struct SDL_Renderer;
32 struct SDL_Surface;
29 33
30 namespace OrthancStone 34 namespace OrthancStone
31 { 35 {
32 class SdlWindow : public boost::noncopyable 36 class SdlWindow : public boost::noncopyable
33 { 37 {
34 private: 38 private:
35 SDL_Window *window_; 39 struct SDL_Window *window_;
36 SDL_Renderer *renderer_; 40 struct SDL_Renderer *renderer_;
37 bool maximized_; 41 bool maximized_;
38 42
39 public: 43 public:
40 SdlWindow(const char* title, 44 SdlWindow(const char* title,
41 unsigned int width, 45 unsigned int width,
42 unsigned int height, 46 unsigned int height,
52 56
53 unsigned int GetWidth() const; 57 unsigned int GetWidth() const;
54 58
55 unsigned int GetHeight() const; 59 unsigned int GetHeight() const;
56 60
57 void Render(SDL_Surface* surface); 61 void Render(struct SDL_Surface* surface);
58 62
59 void ToggleMaximize(); 63 void ToggleMaximize();
60 64
61 static void GlobalInitialize(); 65 static void GlobalInitialize();
62 66