The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

57 lines
2.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #pragma once
  18. extern "C"
  19. {
  20. typedef void* LiveCodeBuilder;
  21. typedef bool (*SendMessageFunction) (void* userInfo, const void* data, size_t dataSize);
  22. typedef void (*CrashCallbackFunction) (const char* crashDescription);
  23. typedef void (*QuitCallbackFunction)();
  24. typedef void (*SetPropertyFunction) (const char* key, const char* value);
  25. typedef void (*GetPropertyFunction) (const char* key, char* value, size_t size);
  26. typedef void (*LoginCallbackFunction) (void* userInfo, const char* errorMessage, const char* username, const char* apiKey);
  27. // We've used an X macro to define the DLL functions rather than just declaring them, so that
  28. // we can load the DLL and its functions dynamically and cope with it not being there.
  29. // The CompileEngineDLL class is a wrapper that manages finding/loading the DLL and exposing
  30. // these as callable functions.
  31. #define LIVE_DLL_FUNCTIONS(X) \
  32. X (projucer_getVersion, int, ()) \
  33. X (projucer_initialise, void, (CrashCallbackFunction, QuitCallbackFunction, SetPropertyFunction, GetPropertyFunction, bool setupSignals)) \
  34. X (projucer_shutdown, void, ()) \
  35. X (projucer_createBuilder, LiveCodeBuilder, (SendMessageFunction, void* userInfo, const char* projectID, const char* cacheFolder)) \
  36. X (projucer_sendMessage, void, (LiveCodeBuilder, const void* messageData, size_t messageDataSize)) \
  37. X (projucer_deleteBuilder, void, (LiveCodeBuilder)) \
  38. X (projucer_login, void, (const char* userLoginName, const char* userPassword, bool remainLoggedIn, LoginCallbackFunction, void* callbackUserInfo)) \
  39. X (projucer_logout, void, ()) \
  40. X (projucer_isLoggedIn, bool, ()) \
  41. X (projucer_getLoginName, void, (char*)) \
  42. X (projucer_hasLicense, bool, (const char* featureName)) \
  43. X (projucer_hasLiveCodingLicence, bool, ())
  44. }