/usr/include/faust/gui/jsonfaustui.h is in faust-common 0.9.95~repack1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | /*
Copyright (C) 2012 Grame
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
research@grame.fr
*/
#ifndef __jsonfaustui__
#define __jsonfaustui__
#include "faust/gui/meta.h"
#include "faust/gui/UI.h"
#include <string>
namespace httpdfaust
{
template <typename C> class jsonui;
class jsonfaustui : public UI, public Meta
{
jsonui<FAUSTFLOAT>* fJSON;
public:
jsonfaustui(const char *name, const char* address, int port);
virtual ~jsonfaustui();
//--------------------------------------------
// UI methods
//--------------------------------------------
// -- widget's layouts
virtual void openTabBox(const char* label);
virtual void openHorizontalBox(const char* label);
virtual void openVerticalBox(const char* label);
virtual void closeBox();
// -- active widgets
void addButton(const char* label, FAUSTFLOAT* zone);
void addCheckButton(const char* label, FAUSTFLOAT* zone);
void addVerticalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step);
void addHorizontalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step);
void addNumEntry(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step);
// -- passive widgets
void addHorizontalBargraph(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT min, FAUSTFLOAT max);
void addVerticalBargraph(const char* label, FAUSTFLOAT* zone, float min, float max);
// -- metadata declarations
void declare(FAUSTFLOAT*, const char*, const char*);
//--------------------------------------------
// additionnal methods (not part of UI)
//--------------------------------------------
void numInput(int n); // should be called with the inputs number
void numOutput(int n); // should be called with the outputs number
void declare(const char* , const char*); // global metadata declaration
//--------------------------------------------
// and eventually how to get the json as a string
//--------------------------------------------
std::string json(bool flatten);
};
} //end namespace
#endif
|