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.

iplugviewcontentscalesupport.h 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. - [released: 3.6.6]
  29. - [optional]
  30. This interface communicates the content scale factor from the host to the plug-in view on
  31. systems where plug-ins cannot get this information directly like Microsoft Windows.
  32. The host calls setContentScaleFactor directly after the plug-in view is attached and when the scale
  33. factor changes (system change or window moved to another screen with different scaling settings).
  34. The host could call setContentScaleFactor in a different context, for example: scaling the
  35. plug-in editor for better readability.
  36. When a plug-in handles this (by returning kResultTrue), it needs to scale the width and height of
  37. its view by the scale factor and inform the host via a IPlugFrame::resizeView(), the host will then
  38. call IPlugView::onSize().
  39. Note that the host is allowed to call setContentScaleFactor() at any time the IPlugView is valid.
  40. */
  41. class IPlugViewContentScaleSupport : public FUnknown
  42. {
  43. public:
  44. //------------------------------------------------------------------------
  45. typedef float ScaleFactor;
  46. virtual tresult PLUGIN_API setContentScaleFactor (ScaleFactor factor) = 0;
  47. //------------------------------------------------------------------------
  48. static const FUID iid;
  49. };
  50. DECLARE_CLASS_IID (IPlugViewContentScaleSupport, 0x65ED9690, 0x8AC44525, 0x8AADEF7A, 0x72EA703F)
  51. //------------------------------------------------------------------------
  52. } // namespace Steinberg
  53. //------------------------------------------------------------------------
  54. #include "pluginterfaces/base/falignpop.h"
  55. //------------------------------------------------------------------------