aboutsummaryrefslogtreecommitdiff
path: root/externals/build/include
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2003-03-21 10:15:43 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2003-03-21 10:15:43 +0000
commit9645c9b233beb36b19bde5afe8c8d0f7eef18c47 (patch)
tree922c41f70fd9f84431a8a88166647586a51a3de4 /externals/build/include
parent5697ebe98e16f1438d6feba09cb075b6a0f2a653 (diff)
updated externals.pd
svn path=/trunk/; revision=490
Diffstat (limited to 'externals/build/include')
-rw-r--r--externals/build/include/extlib_util.h13
-rw-r--r--externals/build/include/g_canvas.h31
-rw-r--r--externals/build/include/m_imp.h3
3 files changed, 41 insertions, 6 deletions
diff --git a/externals/build/include/extlib_util.h b/externals/build/include/extlib_util.h
new file mode 100644
index 00000000..8ab253f4
--- /dev/null
+++ b/externals/build/include/extlib_util.h
@@ -0,0 +1,13 @@
+#include "../../creb/include/extlib_util.h"
+
+float milliseconds_2_one_minus_realpole(float time)
+{
+ float r;
+
+ if (time < 0.0f) time = 0.0f;
+ r = -expm1(1000.0f * log(ENVELOPE_RANGE) / (sys_getsr() * time));
+ if (!(r < 1.0f)) r = 1.0f;
+
+ return r;
+}
+
diff --git a/externals/build/include/g_canvas.h b/externals/build/include/g_canvas.h
index fb567ea5..e4eecfc0 100644
--- a/externals/build/include/g_canvas.h
+++ b/externals/build/include/g_canvas.h
@@ -66,9 +66,6 @@ EXTERN_STRUCT _tscalar;
EXTERN_STRUCT _canvasenvironment;
#define t_canvasenvironment struct _canvasenvironment
-EXTERN_STRUCT _linetraverser;
-#define t_linetraverser struct _linetraverser
-
typedef struct _selection
{
t_gobj *sel_what;
@@ -92,9 +89,15 @@ typedef struct _editor
struct _glist *e_glist; /* glist which owns this */
int e_xwas; /* xpos on last mousedown or motion event */
int e_ywas; /* ypos, similarly */
+ int e_selectline_index1; /* indices for the selected line if any */
+ int e_selectline_outno; /* (only valid if e_selectedline is set) */
+ int e_selectline_index2;
+ int e_selectline_inno;
+ t_outconnect *e_selectline_tag;
unsigned int e_onmotion: 3; /* action to take on motion */
unsigned int e_lastmoved: 1; /* one if mouse has moved since click */
unsigned int e_textdirty: 1; /* one if e_textedfor has changed */
+ unsigned int e_selectedline: 1; /* one if a line is selected */
} t_editor;
#define MA_NONE 0 /* e_onmotion: do nothing on mouse motion */
@@ -166,7 +169,6 @@ struct _glist
unsigned int gl_edit:1; /* edit mode */
unsigned int gl_imatemplate:1; /* someone needs me as template */
unsigned int gl_isdeleting:1; /* we're inside glist_delete -- hack! */
- unsigned int gl_protect:1; /* don't delete connections on click */
unsigned int gl_stretch:1; /* stretch contents on resize */
unsigned int gl_isgraph:1; /* show as graph on parent */
};
@@ -209,7 +211,7 @@ struct _array
};
/* structure for traversing all the connections in a glist */
-struct _linetraverser
+typedef struct _linetraverser
{
t_canvas *tr_x;
t_object *tr_ob;
@@ -225,7 +227,7 @@ struct _linetraverser
int tr_lx1, tr_ly1, tr_lx2, tr_ly2;
t_outconnect *tr_nextoc;
int tr_nextoutno;
-};
+} t_linetraverser;
/* function types used to define graphical behavior for gobjs, a bit like X
widgets. We don't use Pd methods because Pd's typechecking can't specify the
@@ -388,6 +390,9 @@ EXTERN void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
char *tag, int x1, int y1, int x2, int y2);
EXTERN void glist_eraseiofor(t_glist *glist, t_object *ob, char *tag);
EXTERN void canvas_create_editor(t_glist *x, int createit);
+void canvas_deletelinesforio(t_canvas *x, t_text *text,
+ t_inlet *inp, t_outlet *outp);
+
/* -------------------- functions on texts ------------------------- */
EXTERN void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize);
@@ -470,6 +475,16 @@ EXTERN int canvas_hitbox(t_canvas *x, t_gobj *y, int xpos, int ypos,
int *x1p, int *y1p, int *x2p, int *y2p);
EXTERN int canvas_setdeleting(t_canvas *x, int flag);
+typedef void (*t_undofn)(t_canvas *canvas, void *buf,
+ int action); /* a function that does UNDO/REDO */
+#define UNDO_FREE 0 /* free current undo/redo buffer */
+#define UNDO_UNDO 1 /* undo */
+#define UNDO_REDO 2 /* redo */
+EXTERN void canvas_setundo(t_canvas *x, t_undofn undofn, void *buf,
+ const char *name);
+EXTERN void canvas_noundo(t_canvas *x);
+EXTERN int canvas_getindex(t_canvas *x, t_gobj *y);
+
/* ---- functions on canvasses as objects --------------------- */
EXTERN void canvas_fattenforscalars(t_canvas *x,
@@ -562,3 +577,7 @@ EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
/* ----------------------- guiconnects, g_guiconnect.c --------- */
EXTERN t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym);
EXTERN void guiconnect_notarget(t_guiconnect *x, double timedelay);
+
+/* ------------- IEMGUI routines used in other g_ files ---------------- */
+EXTERN t_symbol *iemgui_raute2dollar(t_symbol *s);
+EXTERN t_symbol *iemgui_dollar2raute(t_symbol *s);
diff --git a/externals/build/include/m_imp.h b/externals/build/include/m_imp.h
index 05e20c0b..e6ad155f 100644
--- a/externals/build/include/m_imp.h
+++ b/externals/build/include/m_imp.h
@@ -72,6 +72,8 @@ extern char *sys_guicmd;
/* in s_main.c */
EXTERN int sys_nearestfontsize(int fontsize);
EXTERN int sys_hostfontsize(int fontsize);
+extern char sys_cordcolor[];
+extern int sys_guishadow;
extern int sys_defaultfont;
extern t_symbol *sys_libdir; /* library directory for auxilliary files */
@@ -90,6 +92,7 @@ and MIDI I/O as follows: */
#define SENDDACS_YES 1
#define SENDDACS_SLEPT 2
+#define API_PROBE -1
#define API_OSS 0 /* API choices */
#define API_ALSA 1
#define API_RME 2