Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/CICM/CreamLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasLeMeur committed Jun 25, 2015
2 parents 3aabaaa + b425e5e commit d7eaac8
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 533 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
Makefile
Makefile.in
cream-meta.pd
README.txt
config/*
configure
config.status
Expand Down
2 changes: 1 addition & 1 deletion cream-meta.pd.in → Cream-meta.pd
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#N canvas 25 49 420 300 META 1;
#X text 13 41 NAME Cream;
#X text 10 25 AUTHOR Pierre Guillot;
#X text 10 10 VERSION @PACKAGE_VERSION@;
#X text 10 10 VERSION beta-0.4-git;
#X restore 10 10 pd META;
11 changes: 4 additions & 7 deletions Cream.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,8 @@
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = NO;
HEADER_SEARCH_PATHS = "";
"HEADER_SEARCH_PATHS[arch=*]" = "";
HEADER_SEARCH_PATHS = "/Applications/Pd-0.46-6.app/Contents/Resources/src/";
"HEADER_SEARCH_PATHS[arch=*]" = "/Applications/Pd-0.46-6.app/Contents/Resources/src/";
INSTALL_PATH = $SRCROOT/Package/Cream;
LIBRARY_SEARCH_PATHS = "";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
Expand Down Expand Up @@ -596,10 +596,7 @@
EXECUTABLE_PREFIX = "";
FRAMEWORK_SEARCH_PATHS = "";
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREPROCESSOR_DEFINITIONS = (
PD_EXTENDED,
_APPLE_,
);
GCC_PREPROCESSOR_DEFINITIONS = _APPLE_;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
GCC_UNROLL_LOOPS = YES;
Expand All @@ -615,7 +612,7 @@
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_LABEL = YES;
HEADER_SEARCH_PATHS = "";
"HEADER_SEARCH_PATHS[arch=*]" = "";
"HEADER_SEARCH_PATHS[arch=*]" = "/Applications/Pd-extended.app/Contents/Resources/include/pdextended/";
INSTALL_PATH = "$SRCROOT/Package/Cream/externals/MacOs/pd-extended";
LIBRARY_SEARCH_PATHS = "";
OTHER_LDFLAGS = (
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SUBDIRS= Deprecated Sources
SUBDIRS+= ThirdParty/CicmWrapper
SUBDIRS+= Package/Cream

$(abs_builddir)/.libs/cream.@EXTENSION@: cream.la
$(abs_builddir)/.libs/cream.@EXTENSION@: Cream.la

$(top_builddir)/cream.@EXTENSION@: $(abs_builddir)/.libs/cream.@EXTENSION@
rm -f $@ && cd $(top_builddir) && test -e $< && $(LN_S) $< cream.@EXTENSION@ || true
Expand Down
504 changes: 6 additions & 498 deletions Package/Cream/LICENSE.txt

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions Package/Cream/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## [Cream Library](http://www.mshparisnord.fr/hoalibrary/en/publications/ "Publication") for Pure Data

A set of PD externals for those who like vanilla... but also want some chocolate cream.
The Cream Library uses the [CICM Wrapper](https://github.com/CICM/CicmWrapper" "CICM Wrapper") developed to facilitate the creation of signal objects and GUI and to improve user interactions to offer a set of externals that improve the user interraction in Pure Data.

### Compatibilty :

The lastest release has been tested [Pure Data Vanilla](http://msp.ucsd.edu/software.html "PD-Vanilla") (0.46.6 - 32/64 bits) & [Pure Data Extended](https://puredata.info/ "PD-Extended") (0.43.4) on Linux, Mac Os, Windows .

### Installation :

With Pure Data Vanilla, copy the <em>Cream</em> folder in your package folder and add <em>Cream</em> in the PD's statup window if you use the default package folder\*, otherwise add <em>Cream/Cream</em>.

With Pure Data Extended, copy the <em>Cream</em> folder in your package folder and add <em>-lib externals/Cream</em> in the statup falgs if you use the default package folder\*, otherwise add <em>-lib Cream/Cream</em>.

\* The default package folder are generally <em>/usr/local/lib/pd-externals</em> on Linux, <em>/Library/Pd</em> on Mac Os and <em>C:\Program Files\Common Files\Pd</em> on Windows.

### Documentation :

Helps and tutorials are availables in the <em>Cream</em> folder of the <em>help browser</em>.

### Compilation :

./autogen.sh (if needed)
./configure (useful options --with-pd=</path/to/pd>)
make
make install (optional)

XCode, CodeBlock and Visual Studio projects are also available.

### Dependencies :

[Cicm Wrapper](https://github.com/CICM/CicmWrapper "Cicm Wrapper").

### Authors :

Pierre Guillot

### Licence :

Copyright (C) 2013-2015 Pierre Guillot - CICM - Universite Paris 8
The Cream Library in under the [BSD2 License](http://opensource.org/licenses/BSD-2-Clause "BSD2").


7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The lastest release has been tested [Pure Data Vanilla](http://msp.ucsd.edu/soft

With Pure Data Vanilla, copy the <em>Cream</em> folder in your package folder and add <em>Cream</em> in the PD's statup window if you use the default package folder\*, otherwise add <em>Cream/Cream</em>.

With Pure Data Extended, copy the <em>Cream</em> folder in your package folder and add <em>-lib externals/"system"/pd-extended/Cream</em> in the statup falgs if you use the default package folder\*, otherwise add <em>-lib Cream/externals/"system"/pd-extended/Cream</em> with <em>"system"</em> replaced by <em>Linux</em>, <em>MacOs</em> or <em>Windows</em> for example <em>-lib Cream/externals/MacOs/pd-extended/Cream</em>.
With Pure Data Extended, copy the <em>Cream</em> folder in your package folder and add <em>-lib externals/Cream</em> in the statup falgs if you use the default package folder\*, otherwise add <em>-lib Cream/Cream</em>.

\* The default package folder are generally <em>/usr/local/lib/pd-externals</em> on Linux, <em>/Library/Pd</em> on Mac Os and <em>C:\Program Files\Common Files\Pd</em> on Windows.

Expand All @@ -22,7 +22,7 @@ Helps and tutorials are availables in the <em>Cream</em> folder of the <em>help
### Compilation :

./autogen.sh (if needed)
./configure or ./configure --with-pdextended
./configure (useful options --with-pd=</path/to/pd>)
make
make install (optional)

Expand All @@ -38,6 +38,7 @@ Pierre Guillot

### Licence :

The Cream Library in under the <a title="GNU" href="http://www.gnu.org/copyleft/gpl.html" target="_blank">GNU Public License</a>. If you'd like to avoid the restrictions of the GPL and use Cream Library for a closed-source product, you contact the <a title="CICM" href="http://cicm.mshparisnord.org/" target="_blank">CICM</a>.
Copyright (C) 2013-2015 Pierre Guillot - CICM - Universite Paris 8
The Cream Library in under the [BSD2 License](http://opensource.org/licenses/BSD-2-Clause "BSD2").


44 changes: 44 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## [Cream Library](http://www.mshparisnord.fr/hoalibrary/en/publications/ "Publication") for Pure Data

A set of PD externals for those who like vanilla... but also want some chocolate cream.
The Cream Library uses the [CICM Wrapper](https://github.com/CICM/CicmWrapper" "CICM Wrapper") developed to facilitate the creation of signal objects and GUI and to improve user interactions to offer a set of externals that improve the user interraction in Pure Data.

### Compatibilty :

The lastest release has been tested [Pure Data Vanilla](http://msp.ucsd.edu/software.html "PD-Vanilla") (0.46.6 - 32/64 bits) & [Pure Data Extended](https://puredata.info/ "PD-Extended") (0.43.4) on Linux, Mac Os, Windows .

### Installation :

With Pure Data Vanilla, copy the <em>Cream</em> folder in your package folder and add <em>Cream</em> in the PD's statup window if you use the default package folder\*, otherwise add <em>Cream/Cream</em>.

With Pure Data Extended, copy the <em>Cream</em> folder in your package folder and add <em>-lib externals/Cream</em> in the statup falgs if you use the default package folder\*, otherwise add <em>-lib Cream/Cream</em>.

\* The default package folder are generally <em>/usr/local/lib/pd-externals</em> on Linux, <em>/Library/Pd</em> on Mac Os and <em>C:\Program Files\Common Files\Pd</em> on Windows.

### Documentation :

Helps and tutorials are availables in the <em>Cream</em> folder of the <em>help browser</em>.

### Compilation :

./autogen.sh (if needed)
./configure (useful options --with-pd=</path/to/pd>)
make
make install (optional)

XCode, CodeBlock and Visual Studio projects are also available.

### Dependencies :

[Cicm Wrapper](https://github.com/CICM/CicmWrapper "Cicm Wrapper").

### Authors :

Pierre Guillot

### Licence :

Copyright (C) 2013-2015 Pierre Guillot - CICM - Universite Paris 8
The Cream Library in under the [BSD2 License](http://opensource.org/licenses/BSD-2-Clause "BSD2").


33 changes: 19 additions & 14 deletions Sources/c.number.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ extern "C" void setup_c0x2enumber(void)
CLASS_ATTR_SAVE (c, "min", 1);
CLASS_ATTR_STYLE (c, "min", 0, "number");
CLASS_ATTR_INVISIBLE (c, "min", 1);

CLASS_ATTR_ATOM (c, "max", 0, t_number, f_max);
CLASS_ATTR_ORDER (c, "max", 0, "3");
CLASS_ATTR_LABEL (c, "max", 0, "Maximum Value");
Expand All @@ -111,14 +111,14 @@ extern "C" void setup_c0x2enumber(void)
CLASS_ATTR_SAVE (c, "max", 1);
CLASS_ATTR_STYLE (c, "max", 0, "number");
CLASS_ATTR_INVISIBLE (c, "max", 1);

CLASS_ATTR_ATOM_ARRAY (c, "minmax", 0, t_number, f_min, 2);
CLASS_ATTR_ORDER (c, "minmax", 0, "3");
CLASS_ATTR_LABEL (c, "minmax", 0, "Min - Max Values");
CLASS_ATTR_DEFAULT (c, "minmax", 0, "(null) (null)");
CLASS_ATTR_ACCESSORS (c, "minmax", NULL, number_minmax_set);
CLASS_ATTR_SAVE (c, "minmax", 1);

CLASS_ATTR_LONG (c, "decimal", 0, t_number, f_ndecimal);
CLASS_ATTR_ORDER (c, "decimal", 0, "3");
CLASS_ATTR_LABEL (c, "decimal", 0, "Number of decimal");
Expand All @@ -127,25 +127,25 @@ extern "C" void setup_c0x2enumber(void)
CLASS_ATTR_FILTER_MAX (c, "decimal", 6);
CLASS_ATTR_SAVE (c, "decimal", 1);
CLASS_ATTR_STYLE (c, "decimal", 0, "number");

CLASS_ATTR_RGBA (c, "bgcolor", 0, t_number, f_color_background);
CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color");
CLASS_ATTR_ORDER (c, "bgcolor", 0, "1");
CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
CLASS_ATTR_STYLE (c, "bgcolor", 0, "color");

CLASS_ATTR_RGBA (c, "bdcolor", 0, t_number, f_color_border);
CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color");
CLASS_ATTR_ORDER (c, "bdcolor", 0, "2");
CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
CLASS_ATTR_STYLE (c, "bdcolor", 0, "color");

CLASS_ATTR_RGBA (c, "textcolor", 0, t_number, f_color_text);
CLASS_ATTR_LABEL (c, "textcolor", 0, "Text Color");
CLASS_ATTR_ORDER (c, "textcolor", 0, "3");
CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "textcolor", 0, "0. 0. 0. 1.");
CLASS_ATTR_STYLE (c, "textcolor", 0, "color");

eclass_register(CLASS_BOX, c);
number_class = c;
}
Expand Down Expand Up @@ -471,7 +471,7 @@ void number_mousedrag(t_number *x, t_object *patcherview, t_pt pt, long modifier

if(PD_BADFLOAT(value) || PD_BIGORSMALL(value))
return;

x->f_value = value;
number_output(x);
ebox_invalidate_layer((t_ebox *)x, cream_sym_value_layer);
Expand All @@ -483,7 +483,8 @@ void number_dblclick(t_number *x, t_object *patcherview, t_pt pt, long modifiers
if(x->f_mode == 0)
{
x->f_mode = 1;
sprintf(x->f_textvalue, "");
//sprintf(x->f_textvalue, "");
memset(x->f_textvalue, '\0', 256*sizeof(char));
ebox_invalidate_layer((t_ebox *)x, cream_sym_value_layer);
ebox_redraw((t_ebox *)x);
}
Expand Down Expand Up @@ -539,11 +540,13 @@ void number_keyfilter(t_number *x, t_object *patcherview, char textcharacter, lo
int lenght = (int)strlen(x->f_textvalue);
if(lenght > 1)
{
sprintf(x->f_textvalue + lenght-1, "");
//sprintf(x->f_textvalue + lenght-1, "");
memset(x->f_textvalue+lenght-1, '\0', (size_t)(256-lenght+1)*sizeof(char));
}
else
{
sprintf(x->f_textvalue, "");
//sprintf(x->f_textvalue, "");
memset(x->f_textvalue, '\0', 256*sizeof(char));
}

ebox_invalidate_layer((t_ebox *)x, cream_sym_value_layer);
Expand All @@ -561,7 +564,8 @@ void number_keyfilter(t_number *x, t_object *patcherview, char textcharacter, lo
else if (textcharacter == EKEY_ESC)
{
x->f_mode = 0;
sprintf(x->f_textvalue, "");
//sprintf(x->f_textvalue, "");
memset(x->f_textvalue, '\0', 256*sizeof(char));

ebox_invalidate_layer((t_ebox *)x, cream_sym_value_layer);
ebox_redraw((t_ebox *)x);
Expand All @@ -571,7 +575,8 @@ void number_keyfilter(t_number *x, t_object *patcherview, char textcharacter, lo
void number_mouseleave(t_number *x)
{
x->f_mode = 0;
sprintf(x->f_textvalue, "");
//sprintf(x->f_textvalue, "");
memset(x->f_textvalue, '\0', 256*sizeof(char));
ebox_invalidate_layer((t_ebox *)x, cream_sym_value_layer);
ebox_redraw((t_ebox *)x);
}
Expand Down Expand Up @@ -648,7 +653,7 @@ t_pd_err number_minmax_set(t_number *x, t_object *attr, int ac, t_atom *av)
atom_setsym(&x->f_min, s_null);
atom_setsym(&x->f_max, s_null);
}

ebox_invalidate_layer((t_ebox *)x, cream_sym_value_layer);
ebox_redraw((t_ebox *)x);
return 0;
Expand Down
9 changes: 2 additions & 7 deletions c.library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
#include "c.library.h"

char creamversion[] = "Beta 0.4";
#ifdef PD_EXTENDED
char pdversion[] = "Pd-Extended";
#else
char pdversion[] = "Pd-Vanilla";
#endif

extern "C" void libpd_loadcream(void)
{
Expand All @@ -25,7 +20,7 @@ static void *cream_new(t_symbol *s)
t_eobj *x = (t_eobj *)eobj_new(cream_class);
if(x)
{
logpost(x, 3, "Cream Library by Pierre Guillot\n© 2013 - 2015 CICM | Paris 8 University\nVersion %s (%s) for %s %i.%i\n",creamversion, __DATE__, pdversion, PD_MAJOR_VERSION, PD_MINOR_VERSION);
logpost(x, 3, "Cream Library by Pierre Guillot\n© 2013 - 2015 CICM | Paris 8 University\nVersion %s (%s) for Pure Data %i.%i\n", creamversion, __DATE__, PD_MAJOR_VERSION, PD_MINOR_VERSION);
}
return (x);
}
Expand Down Expand Up @@ -80,7 +75,7 @@ extern "C" void cream_setup(void)
t_eobj* obj = (t_eobj *)cream_new(NULL);
if(!obj)
{
verbose(3, "Cream Library by Pierre Guillot\n© 2013 - 2015 CICM | Paris 8 University\nVersion %s (%s) for %s %i.%i\n",creamversion, __DATE__, pdversion, PD_MAJOR_VERSION, PD_MINOR_VERSION);
verbose(3, "Cream Library by Pierre Guillot\n© 2013 - 2015 CICM | Paris 8 University\nVersion %s (%s) for Pure Data %i.%i\n", creamversion, __DATE__, PD_MAJOR_VERSION, PD_MINOR_VERSION);
eobj_free(obj);
}
//epd_add_lib("cream");
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ AC_CONFIG_AUX_DIR(config)
AC_CONFIG_FILES([Deprecated/Makefile Sources/Makefile])
AC_CONFIG_FILES([ThirdParty/CicmWrapper/Makefile ThirdParty/CicmWrapper/Sources/Makefile])
AC_CONFIG_FILES([Package/Cream/Makefile Package/Cream/helps/Makefile Package/Cream/misc/Makefile])
AC_CONFIG_FILES([Cream-meta.pd])

AC_ARG_WITH([pdextended], [AS_HELP_STRING([--with-pdextended], [use PD-Extended instead of PD-Vanilla])], [], [with_pdextended=no])
AS_IF([test "x$with_pdextended" != xno], AC_DEFINE(PD_EXTENDED,[],[Use PD-Extended]), [])
Expand Down

0 comments on commit d7eaac8

Please sign in to comment.