From 2f7d4f902639750d8c0ca49bb15ed11a3d5cadd9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 12 Aug 2008 02:22:02 +0000 Subject: 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 --- vstgui/vstgui.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'vstgui/vstgui.h') 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 (); -- cgit v1.2.1