diff options
author | Damien Zammit <damien@zamaudio.com> | 2015-02-17 11:59:35 +1100 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2015-02-17 11:59:35 +1100 |
commit | 78883fa7f7ea9d85477a27ed3c569a899ee305fb (patch) | |
tree | f1add63ce6f3af86340d7e4c93092776b5479b14 /libs/distrho/src/DistrhoUI.cpp | |
parent | af7a094a0c0e8b658736d77361a2d8d2f99b0006 (diff) | |
parent | 8da011deb152227714196f61eab26e1af37a2890 (diff) |
Merge pull request #24 from falkTX/master
Update DPF, inital file-browser for ZamSFZ
Diffstat (limited to 'libs/distrho/src/DistrhoUI.cpp')
-rw-r--r-- | libs/distrho/src/DistrhoUI.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/libs/distrho/src/DistrhoUI.cpp b/libs/distrho/src/DistrhoUI.cpp index eda57b0..49e8c3e 100644 --- a/libs/distrho/src/DistrhoUI.cpp +++ b/libs/distrho/src/DistrhoUI.cpp @@ -21,9 +21,9 @@ START_NAMESPACE_DISTRHO /* ------------------------------------------------------------------------------------------------------------ * Static data, see DistrhoUIInternal.hpp */ -double d_lastUiSampleRate = 0.0; -void* d_lastUiDspPtr = nullptr; -UIWindow* d_lastUiWindow = nullptr; +double d_lastUiSampleRate = 0.0; +void* d_lastUiDspPtr = nullptr; +Window* d_lastUiWindow = nullptr; /* ------------------------------------------------------------------------------------------------------------ * UI */ @@ -90,35 +90,29 @@ void UI::d_sampleRateChanged(double) {} /* ------------------------------------------------------------------------------------------------------------ * UI Callbacks (optional) */ -#if ! DISTRHO_UI_USE_NTK +void UI::d_uiFileBrowserSelected(const char*) +{ +} + void UI::d_uiReshape(uint width, uint height) { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glOrtho(0, width, height, 0, 0.0f, 1.0f); - glViewport(0, 0, width, height); + glOrtho(0.0, static_cast<GLdouble>(width), static_cast<GLdouble>(height), 0.0, 0.0, 1.0); + glViewport(0, 0, static_cast<GLsizei>(width), static_cast<GLsizei>(height)); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } -#endif /* ------------------------------------------------------------------------------------------------------------ * UI Resize Handling, internal */ -#if DISTRHO_UI_USE_NTK -void UI::resize(int x, int y, int w, int h) -{ - UIWidget::resize(x, y, w, h); - pData->setSizeCallback(w, h); -} -#else void UI::onResize(const ResizeEvent& ev) { pData->setSizeCallback(ev.size.getWidth(), ev.size.getHeight()); } -#endif // ----------------------------------------------------------------------------------------------------------- |