[PD-cvs] pd/src m_pd.h, 1.4.4.11.2.28, 1.4.4.11.2.29 desire.c, 1.1.2.203, 1.1.2.204
Mathieu Bouchard
matju at users.sourceforge.net
Tue Nov 28 00:44:50 CET 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24939
Modified Files:
Tag: devel_0_39
m_pd.h desire.c
Log Message:
introducing PD_PLUSPLUS_FACE, for enabling a more C++-friendly mode in <m_pd.h>
Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.4.4.11.2.28
retrieving revision 1.4.4.11.2.29
diff -C2 -d -r1.4.4.11.2.28 -r1.4.4.11.2.29
*** m_pd.h 23 Nov 2006 21:02:35 -0000 1.4.4.11.2.28
--- m_pd.h 27 Nov 2006 23:44:46 -0000 1.4.4.11.2.29
***************
*** 228,234 ****
--- 228,238 ----
} t_scalar;
+ #ifdef PD_PLUSPLUS_FACE
+ typedef struct t_text : t_gobj {
+ #else
typedef struct _text /* patchable object - graphical, with text */
{
t_gobj te_g; /* header for graphical object */
+ #endif
t_binbuf *te_binbuf; /* holder for the text */
t_outlet *te_outlet; /* linked list of outlets */
***************
*** 238,242 ****
short te_width; /* requested width in chars, 0 if auto */
unsigned int te_type:2; /* from defs below */
! } t_text;
#define T_TEXT 0 /* just a textual comment */
--- 242,247 ----
short te_width; /* requested width in chars, 0 if auto */
unsigned int te_type:2; /* from defs below */
! /* t_object is synonym for t_text (LATER unify them) */
! } t_text, t_object;
#define T_TEXT 0 /* just a textual comment */
***************
*** 245,258 ****
#define T_ATOM 3 /* a cell to display a number or symbol */
- #define te_pd te_g.g_pd
-
- /* t_object is synonym for t_text (LATER unify them) */
-
- typedef struct _text t_object;
-
#define ob_outlet te_outlet
#define ob_inlet te_inlet
#define ob_binbuf te_binbuf
#define ob_pd te_g.g_pd
#define ob_g te_g
--- 250,263 ----
#define T_ATOM 3 /* a cell to display a number or symbol */
#define ob_outlet te_outlet
#define ob_inlet te_inlet
#define ob_binbuf te_binbuf
+ #ifdef PD_PLUSPLUS_FACE
+ #define te_pd g_pd
+ #define ob_pd g_pd
+ #else
+ #define te_pd te_g.g_pd
#define ob_pd te_g.g_pd
+ #endif
#define ob_g te_g
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.203
retrieving revision 1.1.2.204
diff -C2 -d -r1.1.2.203 -r1.1.2.204
*** desire.c 27 Nov 2006 23:23:24 -0000 1.1.2.203
--- desire.c 27 Nov 2006 23:44:46 -0000 1.1.2.204
***************
*** 12,15 ****
--- 12,16 ----
*/
+ #define PD_PLUSPLUS_FACE
#include "m_pd.h"
#include "desire.h"
***************
*** 455,459 ****
while (outno == t->nout) {
t_object *ob = 0;
! t_gobj *y = t->from ? t->from->ob_g.g_next : t->canvas->list;
for (; y; y = y->g_next) if ((ob = pd_checkobject(&y->g_pd))) break;
if (!ob) return 0;
--- 456,460 ----
while (outno == t->nout) {
t_object *ob = 0;
! t_gobj *y = t->from ? t->from->g_next : t->canvas->list;
for (; y; y = y->g_next) if ((ob = pd_checkobject(&y->g_pd))) break;
if (!ob) return 0;
***************
*** 6063,6067 ****
binbuf_restore(x->te_binbuf, 1, &at);
}
! canvas_add(gl, &x->te_g);
} else {
int xpix, ypix;
--- 6064,6068 ----
binbuf_restore(x->te_binbuf, 1, &at);
}
! canvas_add(gl,x);
} else {
int xpix, ypix;
***************
*** 6071,6075 ****
x->te_ypix = (int)canvas_pixelstoy(gl, ypix-3);
binbuf_restore(x->te_binbuf, 1, &at);
! canvas_add(gl, &x->te_g);
}
}
--- 6072,6076 ----
x->te_ypix = (int)canvas_pixelstoy(gl, ypix-3);
binbuf_restore(x->te_binbuf, 1, &at);
! canvas_add(gl,x);
}
}
***************
*** 6106,6110 ****
x->te_width = 0;
x->te_type = T_OBJECT;
! canvas_add(gl, &x->te_g);
if (pd_class(&x->ob_pd) == vinlet_class) canvas_resortinlets(canvas_getcanvas(gl));
if (pd_class(&x->ob_pd) == voutlet_class) canvas_resortoutlets(canvas_getcanvas(gl));
--- 6107,6111 ----
x->te_width = 0;
x->te_type = T_OBJECT;
! canvas_add(gl,x);
if (pd_class(&x->ob_pd) == vinlet_class) canvas_resortinlets(canvas_getcanvas(gl));
if (pd_class(&x->ob_pd) == voutlet_class) canvas_resortoutlets(canvas_getcanvas(gl));
***************
*** 6143,6147 ****
x->te_ypix = atom_getintarg(1, argc, argv);
if (argc > 2) binbuf_restore(x->te_binbuf, argc-2, argv+2);
! canvas_add(gl, &x->te_g);
}
--- 6144,6148 ----
x->te_ypix = atom_getintarg(1, argc, argv);
if (argc > 2) binbuf_restore(x->te_binbuf, argc-2, argv+2);
! canvas_add(gl,x);
}
***************
*** 6199,6207 ****
x->te_ypix = atom_getintarg(1, argc, argv);
if (argc > 2) binbuf_restore(x->te_binbuf, argc-2, argv+2);
! canvas_add(gl, &x->te_g);
} else {
x->te_xpix = 0;
x->te_ypix = 0;
! canvas_add(gl, &x->te_g);
}
}
--- 6200,6208 ----
x->te_ypix = atom_getintarg(1, argc, argv);
if (argc > 2) binbuf_restore(x->te_binbuf, argc-2, argv+2);
! canvas_add(gl,x);
} else {
x->te_xpix = 0;
x->te_ypix = 0;
! canvas_add(gl,x);
}
}
More information about the Pd-cvs
mailing list