Browse Source

Merge branch 'master' into lv2-file-dialog

pull/96/head
falkTX 7 years ago
parent
commit
e81515976b
9 changed files with 19 additions and 28 deletions
  1. +1
    -1
      LICENSE
  2. +2
    -0
      README.md
  3. +1
    -1
      dgl/ImageWidgets.hpp
  4. +1
    -1
      dgl/src/Window.cpp
  5. +2
    -2
      distrho/DistrhoPlugin.hpp
  6. +2
    -0
      distrho/DistrhoUI.hpp
  7. +6
    -22
      distrho/src/DistrhoPluginLV2export.cpp
  8. +3
    -0
      distrho/src/DistrhoUI.cpp
  9. +1
    -1
      distrho/src/DistrhoUIInternal.hpp

+ 1
- 1
LICENSE View File

@@ -1,5 +1,5 @@
DISTRHO Plugin Framework (DPF)
Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com>

Permission to use, copy, modify, and/or distribute this software for any purpose with
or without fee is hereby granted, provided that the above copyright notice and this


+ 2
- 0
README.md View File

@@ -27,6 +27,8 @@ List of plugins made with DPF:<br/>
- [DISTRHO ndc Plugs](https://github.com/DISTRHO/ndc-Plugs)
- [Juice Plugins](https://github.com/DISTRHO/JuicePlugins) (work in progress)
- [ZamAudio Suite](https://github.com/zamaudio/zam-plugins)
- [DragonFly-Reverb](https://github.com/michaelwillis/dragonfly-reverb)
- [Wolf-Shaper](https://github.com/pdesaulniers/wolf-shaper)


Plugin examples are available in the `example/` folder inside this repo.<br/>


+ 1
- 1
dgl/ImageWidgets.hpp View File

@@ -240,7 +240,7 @@ public:
{
public:
virtual ~Callback() {}
virtual void imageSwitchClicked(ImageSwitch* imageButton, bool down) = 0;
virtual void imageSwitchClicked(ImageSwitch* imageSwitch, bool down) = 0;
};

explicit ImageSwitch(Window& parent, const Image& imageNormal, const Image& imageDown) noexcept;


+ 1
- 1
dgl/src/Window.cpp View File

@@ -153,7 +153,7 @@ struct Window::PrivateData {
fView(puglInit()),
fFirstInit(true),
fVisible(parentId != 0),
fResizable(true),
fResizable(parentId == 0),
fUsingEmbed(parentId != 0),
fWidth(1),
fHeight(1),


+ 2
- 2
distrho/DistrhoPlugin.hpp View File

@@ -546,7 +546,7 @@ struct TimePosition {

/**
Current tick within beat.@n
Should always be > 0 and <= @a ticksPerBeat.@n
Should always be >= 0 and < @a ticksPerBeat.@n
The first tick is tick '0'.
*/
int32_t tick;
@@ -567,7 +567,7 @@ struct TimePosition {
float beatType;

/**
Number of ticks within a bar.@n
Number of ticks within a beat.@n
Usually a moderately large integer with many denominators, such as 1920.0.
*/
double ticksPerBeat;


+ 2
- 0
distrho/DistrhoUI.hpp View File

@@ -67,12 +67,14 @@ public:
*/
bool isUserResizable() const noexcept;

#ifdef HAVE_DGL
/**
Set geometry constraints for the UI when resized by the user, and optionally scale UI automatically.
@see Window::setGeometryConstraints(uint,uint,bool)
@see Window::setScaling(double)
*/
void setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale = false);
#endif

/* --------------------------------------------------------------------------------------------------------
* Host state */


+ 6
- 22
distrho/src/DistrhoPluginLV2export.cpp View File

@@ -139,17 +139,9 @@ void lv2_generate_ttl(const char* const basename)
# endif
manifestString += "\n";
# if DISTRHO_PLUGIN_HAS_EMBED_UI
/*
if (! pluginUI.isUserResizable())
{
manifestString += " lv2:optionalFeature ui:noUserResize ,\n";
manifestString += " ui:resize ,\n";
}
else
*/
{
manifestString += " lv2:optionalFeature ui:resize ,\n";
}
// TODO: pluginUI.isUserResizable()
manifestString += " lv2:optionalFeature ui:noUserResize ,\n";
manifestString += " ui:resize ,\n";
manifestString += " ui:touch ;\n";
manifestString += "\n";
# endif
@@ -638,17 +630,9 @@ void lv2_generate_ttl(const char* const basename)
# endif
uiString += "\n";
# if DISTRHO_PLUGIN_HAS_EMBED_UI
/*
if (! pluginUI.isUserResizable())
{
uiString += " lv2:optionalFeature ui:noUserResize ,\n";
uiString += " ui:resize ,\n";
}
else
*/
{
uiString += " lv2:optionalFeature ui:resize ,\n";
}
// TODO: pluginUI.isUserResizable()
uiString += " lv2:optionalFeature ui:noUserResize ,\n";
uiString += " ui:resize ,\n";
uiString += " ui:touch ;\n";
uiString += "\n";
# endif


+ 3
- 0
distrho/src/DistrhoUI.cpp View File

@@ -62,6 +62,7 @@ bool UI::isUserResizable() const noexcept
return pData->userResizable;
}

#ifdef HAVE_DGL
void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale)
{
DISTRHO_SAFE_ASSERT_RETURN(minWidth > 0,);
@@ -72,7 +73,9 @@ void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRa
pData->minHeight = minHeight;

getParentWindow().setGeometryConstraints(minWidth, minHeight, keepAspectRatio);

}
#endif

/* ------------------------------------------------------------------------------------------------------------
* Host state */


+ 1
- 1
distrho/src/DistrhoUIInternal.hpp View File

@@ -471,7 +471,7 @@ public:
return glWindow.handlePluginSpecial(press, key);
}
#else
void setWindowSize(const uint, const uint, const bool) {}
void setWindowSize(const uint, const uint, const bool = false) {}
void setWindowTransientWinId(const uintptr_t) {}
bool setWindowVisible(const bool) { return true; }
#endif


Loading…
Cancel
Save