diff options
author | David Robillard <d@drobilla.net> | 2008-08-12 02:22:02 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-12 02:22:02 +0000 |
commit | 2f7d4f902639750d8c0ca49bb15ed11a3d5cadd9 (patch) | |
tree | fefaf7756ef4a2008208eb810fe946da3a229fb7 /vstgui/vstgui.h | |
parent | 91402dee76921409319de689c471e49afce8a490 (diff) | |
download | mda.lv2-2f7d4f902639750d8c0ca49bb15ed11a3d5cadd9.tar.gz mda.lv2-2f7d4f902639750d8c0ca49bb15ed11a3d5cadd9.tar.bz2 mda.lv2-2f7d4f902639750d8c0ca49bb15ed11a3d5cadd9.zip |
Move CBitmap interface closer to motif port for easier porting.
git-svn-id: http://svn.drobilla.net/lad/mda-lv2@1342 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'vstgui/vstgui.h')
-rw-r--r-- | vstgui/vstgui.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/vstgui/vstgui.h b/vstgui/vstgui.h index 22fcb84..9ee6be0 100644 --- a/vstgui/vstgui.h +++ b/vstgui/vstgui.h @@ -68,10 +68,27 @@ struct ERect { VstInt16 bottom; }; +/** Table of PNG resources (by filename). + * This is ugly and weird, but designed to allow for easy porting + * from "motif" ported plugins (via simple search/replacing). + */ +struct CResTableEntry { + int id; ///< Resource ID (same as motif) + const char* path; ///< Filename (was char** xpmdata for motif) +}; + +typedef CResTableEntry CResTable[]; +extern CResTable pngResources; + //---------------------------------------------------- //---------------------------------------------------- namespace VSTGUI { +extern char* bundlePath; +void setBundlePath(const char* path); + + + class CFrame; class CDrawContext; class COffscreenContext; @@ -122,9 +139,6 @@ public: void idle (); void update (); - void setBundlePath(const char* path) { bundlePath = strdup(path); } - const char* getBundlePath() { return bundlePath; } - #if VST_2_1_EXTENSIONS long onKeyDown (VstKeyCode& keyCode); long onKeyUp (VstKeyCode& keyCode); @@ -137,7 +151,6 @@ protected: unsigned int lLastTicks; bool inIdleStuff; static VstInt32 knobMode; - char* bundlePath; friend class VSTGUI::CFrame; VSTGUI::CFrame* frame; }; @@ -655,7 +668,7 @@ protected: class CBitmap : public CReferenceCounter { public: - CBitmap (AEffGUIEditor& editor, const char* img_name); ///< Create from a filename + CBitmap (long resourceID); ///< Create from a filename CBitmap (CFrame &frame, CCoord width, CCoord height); ///< Create a pixmap with a given size. virtual ~CBitmap (); |