[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / windowing / ios / WinSystemIOS.h
blobbf8a8ae1d0c2598cffb16bab8ed5119b3cc618d1
1 /*
2 * Copyright (C) 2010-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "rendering/gles/RenderSystemGLES.h"
12 #include "threads/CriticalSection.h"
13 #include "windowing/WinSystem.h"
15 #include <string>
16 #include <vector>
18 #include <CoreVideo/CVOpenGLESTextureCache.h>
20 class IDispResource;
21 class CVideoSyncIos;
22 struct CADisplayLinkWrapper;
24 class CWinSystemIOS : public CWinSystemBase, public CRenderSystemGLES
26 public:
27 CWinSystemIOS();
28 ~CWinSystemIOS() override;
30 static void Register();
31 static std::unique_ptr<CWinSystemBase> CreateWinSystem();
33 int GetDisplayIndexFromSettings();
34 // Implementation of CWinSystemBase
35 CRenderSystemBase *GetRenderSystem() override { return this; }
36 bool InitWindowSystem() override;
37 bool DestroyWindowSystem() override;
38 bool CreateNewWindow(const std::string& name, bool fullScreen, RESOLUTION_INFO& res) override;
39 bool DestroyWindow() override;
40 bool ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop) override;
41 bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;
42 void UpdateResolutions() override;
43 bool CanDoWindowed() override { return false; }
45 void ShowOSMouse(bool show) override {}
46 bool HasCursor() override;
48 void NotifyAppActiveChange(bool bActivated) override;
50 bool Minimize() override;
51 bool Restore() override;
52 bool Hide() override;
53 bool Show(bool raise = true) override;
55 bool IsExtSupported(const char* extension) const override;
57 bool BeginRender() override;
58 bool EndRender() override;
60 void Register(IDispResource *resource) override;
61 void Unregister(IDispResource *resource) override;
63 std::unique_ptr<CVideoSync> GetVideoSync(CVideoReferenceClock* clock) override;
65 std::vector<std::string> GetConnectedOutputs() override;
67 bool InitDisplayLink(CVideoSyncIos *syncImpl);
68 void DeinitDisplayLink(void);
69 void OnAppFocusChange(bool focus);
70 bool IsBackgrounded() const { return m_bIsBackgrounded; }
71 CVEAGLContext GetEAGLContextObj();
72 void MoveToTouchscreen();
74 // winevents override
75 bool MessagePump() override;
77 protected:
78 void PresentRenderImpl(bool rendered) override;
79 void SetVSyncImpl(bool enable) override {}
81 void *m_glView; // EAGLView opaque
82 void *m_WorkingContext; // shared EAGLContext opaque
83 bool m_bWasFullScreenBeforeMinimize;
84 std::string m_eglext;
85 CCriticalSection m_resourceSection;
86 std::vector<IDispResource*> m_resources;
87 bool m_bIsBackgrounded;
89 private:
90 bool GetScreenResolution(int* w, int* h, double* fps, int screenIdx);
91 void FillInVideoModes(int screenIdx);
92 bool SwitchToVideoMode(int width, int height, double refreshrate);
93 CADisplayLinkWrapper *m_pDisplayLink;
94 int m_internalTouchscreenResolutionWidth = -1;
95 int m_internalTouchscreenResolutionHeight = -1;