Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.9KB

  1. //-----------------------------------------------------------------------------
  2. // Project : SDK Core
  3. //
  4. // Category : SDK GUI Interfaces
  5. // Filename : pluginterfaces/gui/iplugviewcontentscalesupport.h
  6. // Created by : Steinberg, 06/2016
  7. // Description : Plug-in User Interface Scaling
  8. //
  9. //-----------------------------------------------------------------------------
  10. // This file is part of a Steinberg SDK. It is subject to the license terms
  11. // in the LICENSE file found in the top-level directory of this distribution
  12. // and at www.steinberg.net/sdklicenses.
  13. // No part of the SDK, including this file, may be copied, modified, propagated,
  14. // or distributed except according to the terms contained in the LICENSE file.
  15. //-----------------------------------------------------------------------------
  16. #pragma once
  17. #include "pluginterfaces/base/funknown.h"
  18. //------------------------------------------------------------------------
  19. #include "pluginterfaces/base/falignpush.h"
  20. //------------------------------------------------------------------------
  21. //------------------------------------------------------------------------
  22. namespace Steinberg {
  23. //------------------------------------------------------------------------
  24. /** Plug-in view content scale support
  25. \ingroup pluginGUI vstIPlug vst366
  26. - [plug impl]
  27. - [extends IPlugView]
  28. - [optional]
  29. This interface communicates the content scale factor from the host to the plug-in view on
  30. systems where plug-ins cannot get this information directly like Microsoft Windows.
  31. The host calls setContentScaleFactor directly after the plug view was attached and when the scale
  32. factor changes (system change or window moved to another screen with different scaling settings).
  33. The host could call setContentScaleFactor in a different context, for example: scaling the
  34. plug-in editor for better readability.
  35. When a plug-in handles this (by returning kResultTrue), it needs to scale the width and height of
  36. its view by the scale factor and inform the host via a IPlugFrame::resizeView(), the host will then
  37. call IPlugView::onSize().
  38. Note that the host is allowed to call setContentScaleFactor() at any time the IPlugView is alive.
  39. */
  40. class IPlugViewContentScaleSupport : public FUnknown
  41. {
  42. public:
  43. //------------------------------------------------------------------------
  44. typedef float ScaleFactor;
  45. virtual tresult PLUGIN_API setContentScaleFactor (ScaleFactor factor) = 0;
  46. //------------------------------------------------------------------------
  47. static const FUID iid;
  48. };
  49. DECLARE_CLASS_IID (IPlugViewContentScaleSupport, 0x65ED9690, 0x8AC44525, 0x8AADEF7A, 0x72EA703F)
  50. //------------------------------------------------------------------------
  51. } // namespace Steinberg
  52. //------------------------------------------------------------------------
  53. #include "pluginterfaces/base/falignpop.h"
  54. //------------------------------------------------------------------------