1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-20 01:14:20 +00:00
JUCE/extras/the jucer/JuceLibraryCode/BinaryData.h

46 lines
1.7 KiB
C++

/* =========================================================================================
This is an auto-generated file, created by The Introjucer 3.0.0
Do not edit anything in this file!
*/
namespace BinaryData
{
extern const char* jules_jpg;
const int jules_jpgSize = 24218;
extern const char* prefs_about_png;
const int prefs_about_pngSize = 1819;
extern const char* prefs_keys_png;
const int prefs_keys_pngSize = 3794;
extern const char* prefs_misc_png;
const int prefs_misc_pngSize = 6162;
// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding data and its size (or a null pointer if the name isn't found).
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw();
//==============================================================================
// This class acts as an ImageProvider that will access the BinaryData images
class ImageProvider : public juce::ComponentBuilder::ImageProvider
{
public:
ImageProvider() noexcept {}
juce::Image getImageForIdentifier (const juce::var& imageIdentifier)
{
int dataSize = 0;
const char* const data = getNamedResource (imageIdentifier.toString().toUTF8(), dataSize);
if (data != nullptr)
return juce::ImageCache::getFromMemory (data, dataSize);
return juce::Image();
}
juce::var getIdentifierForImage (const juce::Image&) { return juce::var(); }
};
}