Commit 3729b1df authored by user's avatar user
Browse files

replaced canvas_tag and obj_tag with more generic 'x' specifier in gui_vmess

parent 07ff4ebe
......@@ -146,6 +146,10 @@ Everything else: (A [*] means we've fixed it)
[ ] change x_x1..y2 to simple x_bbox[4], and change current x_bbox to
x_cachebbox (or something like that)
[ ] figure out why gatom_retext sends a fill color to GUI
[ ] look into changing 'x' format specifier from \"x%.6lx\" to more generic
\"%.6lx\". (Not exactly sure what good the "x" does there.) It's only
specified in s_inter and in editor_new, so it should be easy to amend
if need be.
Crashers
--------
......@@ -233,9 +233,9 @@ void iemgui_label(t_iemgui *x, t_symbol *s)
sys_vgui(".x%lx.c itemconfigure %lxLABEL -text {%s} \n",
glist_getcanvas(x->x_glist), x,
s!=s_empty?x->x_lab->s_name:"");
gui_vmess("gui_iemgui_label_set", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_set", "xxs",
glist_getcanvas(x->x_glist),
x,
s != s_empty ? x->x_lab->s_name : "");
iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG);
}
......@@ -251,9 +251,9 @@ void iemgui_label_pos(t_iemgui *x, t_symbol *s, int ac, t_atom *av)
// glist_getcanvas(x->x_glist), x,
// text_xpix((t_object *)x,x->x_glist)+x->x_ldx,
// text_ypix((t_object *)x,x->x_glist)+x->x_ldy);
gui_vmess("gui_iemgui_label_coords", "ssii",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_coords", "xxii",
glist_getcanvas(x->x_glist),
x,
x->x_ldx,
x->x_ldy);
iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG);
......@@ -270,9 +270,9 @@ void iemgui_label_font(t_iemgui *x, t_symbol *s, int ac, t_atom *av)
{
//sys_vgui(".x%lx.c itemconfigure %lxLABEL -font %s\n",
// glist_getcanvas(x->x_glist), x, iemgui_font(x));
gui_vmess("gui_iemgui_label_font", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_font", "xxs",
glist_getcanvas(x->x_glist),
x,
iemgui_font(x));
iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG);
}
......@@ -517,7 +517,7 @@ void iemgui_select(t_gobj *z, t_glist *glist, int selected)
x->x_selected = NULL;
//sys_vgui(".x%lx.c itemconfigure {x%lx&&border} -stroke %s\n", canvas, x,
// x->x_selected && x->x_glist == canvas ? selection_color : border_color);
gui_vmess("gui_text_select_color", "ss", canvas_tag(canvas), gobj_tag(x));
gui_vmess("gui_text_select_color", "xx", canvas, x);
x->x_draw((void *)z, glist, IEM_GUI_DRAW_MODE_SELECT);
if (selected < 2)
{
......@@ -959,12 +959,12 @@ void iemgui_tag_selected(t_iemgui *x) {
if(x->x_selected)
{
//sys_vgui(".x%lx.c addtag selected withtag x%lx\n", canvas, x);
gui_vmess("gui_text_select", "ss", canvas_tag(canvas), gobj_tag(x));
gui_vmess("gui_text_select", "xx", canvas, x);
}
else
{
//sys_vgui(".x%lx.c dtag x%lx selected\n", canvas, x);
gui_vmess("gui_text_deselect", "ss", canvas_tag(canvas), gobj_tag(x));
gui_vmess("gui_text_deselect", "xx", canvas, x);
}
}
......@@ -979,9 +979,9 @@ void iemgui_label_draw_new(t_iemgui *x) {
// x->x_lab!=s_empty?x->x_lab->s_name:"",
// iemgui_font(x), x->x_lcol, x, x);
sprintf(col, "#%6.6x", x->x_lcol);
gui_vmess("gui_iemgui_label_new", "ssiisss",
canvas_tag(canvas),
gobj_tag(x),
gui_vmess("gui_iemgui_label_new", "xxiisss",
canvas,
x,
x->x_ldx,
x->x_ldy,
col,
......@@ -995,9 +995,9 @@ void iemgui_label_draw_move(t_iemgui *x) {
int y1=text_ypix(&x->x_obj, x->x_glist);
//sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
// canvas, x, x1+x->x_ldx, y1+x->x_ldy);
gui_vmess("gui_iemgui_label_coords", "ssii",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_coords", "xxii",
glist_getcanvas(x->x_glist),
x,
x->x_ldx,
x->x_ldy);
}
......@@ -1011,18 +1011,18 @@ void iemgui_label_draw_config(t_iemgui *x) {
// "-fill $pd_colors(selection) -text {%s} \n",
// canvas, x, iemgui_font(x),
// x->x_lab!=s_empty?x->x_lab->s_name:"");
gui_vmess("gui_iemgui_label_font", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_font", "xxs",
glist_getcanvas(x->x_glist),
x,
iemgui_font(x));
gui_vmess("gui_iemgui_label_set", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_set", "xxs",
glist_getcanvas(x->x_glist),
x,
x->x_lab != s_empty ? x->x_lab->s_name: "");
sprintf(col, "#%6.6x", x->x_lcol);
gui_vmess("gui_iemgui_label_color", "sss",
canvas_tag(canvas),
gobj_tag(x),
gui_vmess("gui_iemgui_label_color", "xxs",
canvas,
x,
col);
}
else
......@@ -1031,18 +1031,18 @@ void iemgui_label_draw_config(t_iemgui *x) {
// "-fill #%6.6x -text {%s} \n",
// canvas, x, iemgui_font(x),
// x->x_lcol, x->x_lab!=s_empty?x->x_lab->s_name:"");
gui_vmess("gui_iemgui_label_font", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_font", "xxs",
glist_getcanvas(x->x_glist),
x,
iemgui_font(x));
gui_vmess("gui_iemgui_label_set", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
gui_vmess("gui_iemgui_label_set", "xxs",
glist_getcanvas(x->x_glist),
x,
x->x_lab != s_empty ? x->x_lab->s_name: "");
sprintf(col, "#%6.6x", x->x_lcol);
gui_vmess("gui_iemgui_label_color", "sss",
canvas_tag(canvas),
gobj_tag(x),
gui_vmess("gui_iemgui_label_color", "xxs",
canvas,
x,
col);
}
if (x->x_selected == canvas && x->x_glist == canvas)
......@@ -1061,18 +1061,18 @@ void iemgui_label_draw_select(t_iemgui *x) {
{
//sys_vgui(".x%lx.c itemconfigure %lxLABEL "
// "-fill $pd_colors(selection)\n", canvas, x);
gui_vmess("gui_iemgui_label_select", "ssi",
canvas_tag(canvas),
gobj_tag(x),
gui_vmess("gui_iemgui_label_select", "xxi",
canvas,
x,
1);
}
else
{
//sys_vgui(".x%lx.c itemconfigure %lxLABEL -fill #%6.6x\n",
// canvas, x, x->x_lcol);
gui_vmess("gui_iemgui_label_select", "ssi",
canvas_tag(canvas),
gobj_tag(x),
gui_vmess("gui_iemgui_label_select", "xxi",
canvas,
x,
0);
}
}
......@@ -1113,8 +1113,8 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
// iem_get_tag(canvas, x), i, x,
// x->x_selected == x->x_glist ? "iemgui selected" : "iemgui");
sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_canvas_drawio", "sssiiiiiisiii", canvas_tag(canvas),
gobj_tag(x), tagbuf,
gui_vmess("gui_canvas_drawio", "xxsiiiiiisiii", canvas,
x, tagbuf,
x1+i*k, y2-1, x1+i*k + IOWIDTH, y2, x1, y1, "o", i,
0, 1);
}
......@@ -1124,8 +1124,8 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
//sys_vgui(".x%lx.c delete %so%d\n",
// canvas, iem_get_tag(canvas, x), i);
sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_eraseio", "ss",
canvas_tag(canvas), tagbuf);
gui_vmess("gui_eraseio", "xs",
canvas, tagbuf);
}
a = old_sr_flags & IEM_GUI_OLD_RCV_FLAG;
......@@ -1142,8 +1142,8 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
// iem_get_tag(canvas, x), i, x,
// x->x_selected == x->x_glist ? "iemgui selected" : "iemgui");
sprintf(tagbuf, "%si%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_canvas_drawio", "sssiiiiiisiii", canvas_tag(canvas),
gobj_tag(x), tagbuf,
gui_vmess("gui_canvas_drawio", "xxsiiiiiisiii", canvas,
x, tagbuf,
x1+i*k, y1, x1+i*k + IOWIDTH, y1+1, x1, y1, "i", i,
0, 1);
}
......@@ -1153,8 +1153,8 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
//sys_vgui(".x%lx.c delete %si%d\n",
// canvas, iem_get_tag(canvas, x), i);
sprintf(tagbuf, "%si%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_eraseio", "ss",
canvas_tag(canvas), tagbuf);
gui_vmess("gui_eraseio", "xs",
canvas, tagbuf);
}
}
......@@ -1173,8 +1173,8 @@ void iemgui_io_draw_move(t_iemgui *x) {
//sys_vgui(".x%lx.c coords %so%d %d %d %d %d\n",
// canvas, iem_get_tag(canvas, x), i, x1+i*k, y2-1, x1+i*k+IOWIDTH, y2);
sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i);
gui_start_vmess("gui_configure_item", "ss",
canvas_tag(canvas), tagbuf);
gui_start_vmess("gui_configure_item", "xs",
canvas, tagbuf);
gui_start_array();
gui_s("x");
gui_i(i*k);
......@@ -1188,8 +1188,8 @@ void iemgui_io_draw_move(t_iemgui *x) {
//sys_vgui(".x%lx.c coords %si%d %d %d %d %d\n",
// canvas, iem_get_tag(canvas, x), i, x1+i*k, y1, x1+i*k+IOWIDTH, y1+1);
sprintf(tagbuf, "%si%d", iem_get_tag(canvas, x), i);
gui_start_vmess("gui_configure_item", "ss",
canvas_tag(canvas), tagbuf);
gui_start_vmess("gui_configure_item", "xs",
canvas, tagbuf);
gui_start_array();
gui_s("x");
gui_i(i*k);
......@@ -1209,13 +1209,13 @@ void iemgui_base_draw_new(t_iemgui *x) {
// "-stroke $pd_colors(iemgui_border) -fill #%6.6x "
// "-tags {%lxBASE x%lx text iemgui border}\n",
// canvas, x1,y1,x2,y2, x->x_bcol, x, x);
gui_vmess("gui_text_create_gobj", "sssiii", canvas_tag(canvas), gobj_tag(x),
gui_vmess("gui_text_create_gobj", "xxsiii", canvas, x,
"iemgui", x1, y1, glist_istoplevel(x->x_glist));
char colorbuf[MAXPDSTRING];
sprintf(colorbuf, "#%6.6x", x->x_bcol);
gui_vmess("gui_text_drawborder", "sssiiiii",
canvas_tag(canvas),
gobj_tag(x),
gui_vmess("gui_text_drawborder", "xxsiiiii",
canvas,
x,
colorbuf,
0,
x1, y1, x2, y2);
......@@ -1228,8 +1228,8 @@ void iemgui_base_draw_move(t_iemgui *x) {
c->c_wb->w_getrectfn((t_gobj *)x,x->x_glist,&x1,&y1,&x2,&y2);
gop_redraw=gr;
//sys_vgui(".x%lx.c coords %lxBASE %d %d %d %d\n", canvas, x, x1, y1, x2, y2);
gui_vmess("gui_iemgui_redraw_border", "ssiiii",
canvas_tag(canvas), gobj_tag(x), x1, y1, x2, y2);
gui_vmess("gui_iemgui_redraw_border", "xxiiii",
canvas, x, x1, y1, x2, y2);
}
void iemgui_base_draw_config(t_iemgui *x) {
......@@ -1239,8 +1239,8 @@ void iemgui_base_draw_config(t_iemgui *x) {
char tagbuf[MAXPDSTRING];
char bcol[8]; sprintf(bcol, "#%6.6x", x->x_bcol);
sprintf(tagbuf, "x%lxborder", (long unsigned int)x);
gui_start_vmess("gui_configure_item", "ss",
canvas_tag(canvas), tagbuf);
gui_start_vmess("gui_configure_item", "xs",
canvas, tagbuf);
gui_start_array();
gui_s("fill");
gui_s(bcol);
......@@ -1275,7 +1275,7 @@ void iemgui_draw_move(t_iemgui *x) {
void iemgui_draw_erase(t_iemgui *x) {
t_canvas *canvas=glist_getcanvas(x->x_glist);
//sys_vgui(".x%lx.c delete x%lx\n", canvas, x);
gui_vmess("gui_gobj_erase", "ss", canvas_tag(canvas), gobj_tag(x));
gui_vmess("gui_gobj_erase", "xx", canvas, x);
scalehandle_draw_erase2(x);
}
......
......@@ -1566,8 +1566,8 @@ static void garray_doredraw(t_gobj *client, t_glist *glist)
t_scalar *sc = x->x_scalar;
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "scalar%lx", (long unsigned int)sc->sc_vec);
gui_vmess("gui_text_select", "ss",
canvas_tag(glist_getcanvas(glist)), tagbuf);
gui_vmess("gui_text_select", "xs",
glist_getcanvas(glist), tagbuf);
}
}
}
......
......@@ -35,8 +35,8 @@ void bng_draw_update(t_gobj *xgobj, t_glist *glist)
// x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol);
sprintf(flashcol, "#%6.6x",
x->x_flashed ? x->x_gui.x_fcol : x->x_gui.x_bcol);
gui_vmess("gui_bng_flash", "sss",
canvas_tag(glist_getcanvas(glist)), tagbuf, flashcol);
gui_vmess("gui_bng_flash", "xss",
glist_getcanvas(glist), tagbuf, flashcol);
}
x->x_gui.x_changed = x->x_flashed;
}
......@@ -58,7 +58,7 @@ void bng_draw_new(t_bng *x, t_glist *glist)
// "-tags {%lxBUT x%lx text iemgui border}\n",
// canvas, cx, cy, cr, x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol,
// x, x);
gui_vmess("gui_create_bng", "ssfff", canvas_tag(canvas), tagbuf,
gui_vmess("gui_create_bng", "xsfff", canvas, tagbuf,
cx - x1 - 0.5, cy - y1 - 0.5, cr);
}
......@@ -80,8 +80,8 @@ void bng_draw_move(t_bng *x, t_glist *glist)
sprintf(tagbuf, "x%lxbutton", (long unsigned int)x);
char col[8];
sprintf(col, "#%6.6x", x->x_flashed ? x->x_gui.x_fcol : x->x_gui.x_bcol);
gui_start_vmess("gui_configure_item", "ss",
canvas_tag(canvas), tagbuf);
gui_start_vmess("gui_configure_item", "xs",
canvas, tagbuf);
gui_start_array();
gui_s("cx");
gui_f(cx - x1 - 0.5); // 0.5 is fudge factor... might be better
......@@ -105,8 +105,8 @@ void bng_draw_config(t_bng* x, t_glist* glist)
sprintf(tagbuf, "x%lxbutton", (long unsigned int)x);
char fcol[8];
sprintf(fcol, "#%6.6x", x->x_flashed ? x->x_gui.x_fcol : x->x_gui.x_bcol);
gui_start_vmess("gui_configure_item", "ss",
canvas_tag(canvas), tagbuf);
gui_start_vmess("gui_configure_item", "xs",
canvas, tagbuf);
gui_start_array();
gui_s("fill");
gui_s(fcol);
......
......@@ -248,27 +248,6 @@ void canvas_makefilename(t_canvas *x, char *file, char *result, int resultsize)
//fprintf(stderr,"resulting file = <%s>\n", result);
}
// Generic tag format to use for the gui
// Try removing the leading dot, since
// we don't need it anymore
// Both this and gobj_tag are static which
// means you shouldn't send twice in the same
// gui_vmess (and there shouldn't be a reason
// for doing that anyway)
char *canvas_tag(t_canvas *x)
{
static char s[MAXPDSTRING];
sprintf(s, ".x%lx", (long unsigned int)x);
return s;
}
char *gobj_tag(void *x)
{
static char s[MAXPDSTRING];
sprintf(s, "x%lx", (long unsigned int)x);
return s;
}
void canvas_rename(t_canvas *x, t_symbol *s, t_symbol *dir)
{
canvas_unbind(x);
......@@ -729,8 +708,8 @@ void canvas_reflecttitle(t_canvas *x)
//sys_vgui("wm title .x%lx {%s%c%s - %s}\n",
// x, x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf,
// canvas_getdir(x)->s_name);
gui_vmess("gui_canvas_set_title", "ssssi",
canvas_tag(x), x->gl_name->s_name,
gui_vmess("gui_canvas_set_title", "xsssi",
x, x->gl_name->s_name,
namebuf, canvas_getdir(x)->s_name, x->gl_dirty);
//}
#endif
......@@ -804,8 +783,8 @@ void canvas_drawredrect(t_canvas *x, int doit)
//sys_vgui(".x%lx.c create line "
// "%d %d %d %d %d %d %d %d %d %d -fill #ff8080 -tags GOP\n",
// glist_getcanvas(x), x1, y1, x2, y1, x2, y2, x1, y2, x1, y1);
gui_vmess("gui_canvas_drawredrect", "siiii",
canvas_tag(glist_getcanvas(x)),
gui_vmess("gui_canvas_drawredrect", "xiiii",
glist_getcanvas(x),
x1, y1, x2, y2);
//dpsaha@vt.edu for drawing the GOP_blobs
if (x->gl_goprect && x->gl_edit)
......@@ -814,8 +793,8 @@ void canvas_drawredrect(t_canvas *x, int doit)
else
{
//sys_vgui(".x%lx.c delete GOP\n", glist_getcanvas(x));
gui_vmess("gui_canvas_deleteredrect", "s",
canvas_tag(glist_getcanvas(x)));
gui_vmess("gui_canvas_deleteredrect", "x",
glist_getcanvas(x));
}
}
......@@ -862,8 +841,8 @@ void canvas_map(t_canvas *x, t_floatarg f)
//sys_vgui(".x%lx.c dtag all selected\n", x);
//sys_vgui("foreach item [.x%lx.c find withtag {(!root)}] "
// "{ .x%lx.c delete $item }\n", x, x);
gui_vmess("gui_canvas_erase_all_gobjs", "s",
canvas_tag(x));
gui_vmess("gui_canvas_erase_all_gobjs", "x",
x);
x->gl_mapped = 0;
}
}
......@@ -1072,8 +1051,8 @@ void canvas_eraselinesfor(t_canvas *x, t_text *text)
// glist_getcanvas(x), oc);
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "l%lx", (long unsigned int)oc);
gui_vmess("gui_canvas_delete_line", "ss",
canvas_tag(glist_getcanvas(x)), tagbuf);
gui_vmess("gui_canvas_delete_line", "xs",
glist_getcanvas(x), tagbuf);
}
}
}
......
......@@ -562,8 +562,6 @@ EXTERN t_gobj *canvas_findhitbox(t_canvas *x, int xpos, int ypos,
int *x1p, int *y1p, int *x2p, int *y2p);
EXTERN int canvas_setdeleting(t_canvas *x, int flag);
EXTERN int canvas_hasarray(t_canvas *x);
EXTERN char *canvas_tag(t_canvas *x); /* canvas as string to send to gui */
EXTERN char *gobj_tag(void *x); /* gobj as string to send to gui */
/* ---- for parsing @pd_extra and other sys paths in filenames --------------------- */
......
......@@ -152,8 +152,8 @@ static void canvas_nlet_conf (t_canvas *x, int type) {
/* this is rather confusing, but the canvas_cnct_[xlet]_tag already
includes the type and index concatenated to the end. */
gui_vmess("gui_configure_io", "ssiii",
canvas_tag(x), type == 'o' ? x->gl_editor->canvas_cnct_outlet_tag :
gui_vmess("gui_configure_io", "xsiii",
x, type == 'o' ? x->gl_editor->canvas_cnct_outlet_tag :
x->gl_editor->canvas_cnct_inlet_tag,
isiemgui, issignal, 1);
}
......@@ -444,7 +444,7 @@ void glist_selectline(t_glist *x, t_outconnect *oc, int index1,
//sys_vgui(".x%lx.c addtag selected withtag l%lx\n",
// glist_getcanvas(x), x->gl_editor->e_selectline_tag);
sprintf(tagbuf, "l%lx", (long unsigned int)oc);
gui_vmess("gui_canvas_select_line", "ss", canvas_tag(x), tagbuf);
gui_vmess("gui_canvas_select_line", "xs", x, tagbuf);
c_selection = x;
canvas_draw_gop_resize_hooks(x);
}
......@@ -476,7 +476,7 @@ void glist_deselectline(t_glist *x)
// glist_getcanvas(x)->gl_editor->e_selectline_tag);
canvas_draw_gop_resize_hooks(x);
sprintf(tagbuf, "l%lx", (long unsigned int)x->gl_editor->e_selectline_tag);
gui_vmess("gui_canvas_deselect_line", "ss", canvas_tag(x), tagbuf);
gui_vmess("gui_canvas_deselect_line", "xs", x, tagbuf);
}
}
......@@ -875,8 +875,8 @@ void canvas_disconnect(t_canvas *x,
{
//sys_vgui(".x%lx.c delete l%lx\n", x, oc);
sprintf(tagbuf, "l%lx", (long unsigned int)oc);
gui_vmess("gui_canvas_delete_line", "ss",
canvas_tag(x), tagbuf);
gui_vmess("gui_canvas_delete_line", "xs",
x, tagbuf);
// jsarlo
if(x->gl_editor && x->gl_editor->gl_magic_glass)
{
......@@ -2223,7 +2223,7 @@ void canvas_setcursor(t_canvas *x, unsigned int cursornum)
if (xwas != x || cursorwas != cursornum)
{
//sys_vgui(".x%lx configure -cursor %s\n", x, cursorlist[cursornum]);
gui_vmess("gui_canvas_cursor", "ss", canvas_tag(x),
gui_vmess("gui_canvas_cursor", "xs", x,
cursorlist[cursornum]);
xwas = x;
cursorwas = cursornum;
......@@ -2328,8 +2328,8 @@ static void canvas_rightclick(t_canvas *x, int xpos, int ypos, t_gobj *y_sel)
else isobject = 0;
//sys_vgui("pdtk_canvas_popup .x%lx %d %d %d %d %d\n",
// x, xpos, ypos, canprop, canopen, isobject);
gui_vmess("gui_canvas_popup", "siiiii",
canvas_tag(x), xpos, ypos, canprop, canopen, isobject);
gui_vmess("gui_canvas_popup", "xiiiii",
x, xpos, ypos, canprop, canopen, isobject);
}
/* ---- editors -- perhaps this and "vis" should go to g_editor.c ------- */
......@@ -2341,7 +2341,7 @@ static t_editor *editor_new(t_glist *owner)
x->e_connectbuf = binbuf_new();
x->e_deleted = binbuf_new();
x->e_glist = owner;
sprintf(buf, ".x%lx", (t_int)owner);
sprintf(buf, "x%.6lx", (t_int)owner);
x->e_guiconnect = guiconnect_new(&owner->gl_pd, gensym(buf));
x->gl_magic_glass = magicGlass_new(owner);
x->canvas_cnct_inlet_tag[0] = 0;
......@@ -2442,7 +2442,7 @@ void canvas_vis(t_canvas *x, t_floatarg f)
//sys_vgui("raise .x%lx\n", x);
//sys_vgui("focus .x%lx.c\n", x);
//sys_vgui("wm deiconify .x%lx\n", x);
gui_vmess("gui_raise_window", "s", canvas_tag(x));
gui_vmess("gui_raise_window", "x", x);
}
else
{
......@@ -2456,8 +2456,8 @@ void canvas_vis(t_canvas *x, t_floatarg f)
canvas_args_to_string(argsbuf, x);
gui_vmess("gui_canvas_new", "siisissis",
canvas_tag(x),
gui_vmess("gui_canvas_new", "xiisissis",
x,
(int)(x->gl_screenx2 - x->gl_screenx1),
(int)(x->gl_screeny2 - x->gl_screeny1),
geobuf,
......@@ -2555,7 +2555,7 @@ void canvas_vis(t_canvas *x, t_floatarg f)
if (glist_isvisible(x))
canvas_map(x, 0);
canvas_destroy_editor(x);
gui_vmess("gui_close_window", "s", canvas_tag(x));
gui_vmess("gui_close_window", "x", x);
// delete properties windows of objects in the patcher we're closing
g = x->gl_list;
while (g)
......@@ -3414,8 +3414,8 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
// "$pd_colors(signal_cord_width)" :
// "$pd_colors(control_cord_width)"),
//(issignal ? "signal" : "control"));
gui_vmess("gui_canvas_line", "ssiiiiiiiiii",
canvas_tag(x), "newcord",
gui_vmess("gui_canvas_line", "xsiiiiiiiiii",
x, "newcord",
xpos, ypos, xpos, ypos, xpos, ypos, xpos, ypos, xpos, ypos);
}
else
......@@ -3438,8 +3438,8 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
// x,
// x->gl_editor->canvas_cnct_outlet_tag);
gui_vmess("gui_highlight_io", "ss",
canvas_tag(x),
gui_vmess("gui_highlight_io", "xs",
x,
x->gl_editor->canvas_cnct_outlet_tag);
//sys_vgui(".x%x.c raise %s\n",
......@@ -3499,8 +3499,8 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
// "-strokewidth $highlight_width\n",
// x, x->gl_editor->canvas_cnct_inlet_tag);
gui_vmess("gui_highlight_io", "ss",
canvas_tag(x),
gui_vmess("gui_highlight_io", "xs",
x,
x->gl_editor->canvas_cnct_inlet_tag);
//sys_vgui(".x%x.c raise %s\n",
......@@ -3728,7 +3728,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
//sys_vgui(".x%lx.c create prect %d %d %d %d -tags x "
// "-stroke $pd_colors(selection_rectangle)\n",
// x, xpos, ypos, xpos, ypos);
gui_vmess("gui_create_selection_rectangle", "siiii", canvas_tag(x),
gui_vmess("gui_create_selection_rectangle", "xiiii", x,
xpos, ypos, xpos, ypos);
x->gl_editor->e_xwas = xpos;
x->gl_editor->e_ywas = ypos;
......@@ -3868,8 +3868,8 @@ void canvas_drawconnection(t_canvas *x, int lx1, int ly1, int lx2, int ly2,
// "$pd_colors(control_cord_width)"),
// tag, (issignal ? "signal" : "control"));
sprintf(tagbuf, "l%lx", (long unsigned int)tag);
gui_vmess("gui_canvas_line", "ssiiiiiiiiii",
canvas_tag(x), tagbuf, lx1, ly1, lx1, ly1 + yoff,
gui_vmess("gui_canvas_line", "xsiiiiiiiiii",
x, tagbuf, lx1, ly1, lx1, ly1 + yoff,
lx1 + halfx, ly1 + halfy, lx2, ly2 - yoff, lx2, ly2);
}
......@@ -3914,8 +3914,8 @@ void canvas_updateconnection(t_canvas *x, int lx1, int ly1, int lx2, int ly2,
// lx1, ly1 + yoff, lx1 + halfx, ly1 + halfy,
// lx2, ly2 - yoff, lx2, ly2);
sprintf(cord_tag, "l%lx", (long unsigned int)tag);
gui_vmess("gui_canvas_updateline", "ssiiiii",
canvas_tag(x), cord_tag,
gui_vmess("gui_canvas_updateline", "xsiiiii",
x, cord_tag,
lx1, ly1, lx2, ly2, yoff);
// lx1, ly1, lx1, ly1 + yoff, lx1 + halfx, ly1 + halfy,
// lx2, ly2 - yoff, lx2, ly2);
......@@ -3928,8 +3928,8 @@ void canvas_updateconnection(t_canvas *x, int lx1, int ly1, int lx2, int ly2,
// x, lx1, ly1,
// lx1, ly1 + yoff, lx1 + halfx, ly1 + halfy,
// lx2, ly2 - yoff, lx2, ly2);
gui_vmess("gui_canvas_updateline", "ssiiiii",
canvas_tag(x), "newcord",
gui_vmess("gui_canvas_updateline", "xsiiiii",
x, "newcord",
lx1, ly1, lx2, ly2, yoff);
// lx1, ly1, lx1, ly1 + yoff, lx1 + halfx, ly1 + halfy, lx2, ly2 - yoff,
// lx2, ly2);
......@@ -4529,7 +4529,7 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
if (doit && !glob_shift)
{
sys_vgui(".x%lx.c delete x\n", x);
gui_vmess("gui_canvas_delete_line", "ss", canvas_tag(x), "newcord");
gui_vmess("gui_canvas_delete_line", "xs", x, "newcord");
}
else
{
......@@ -4599,8 +4599,8 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
// "-strokewidth $highlight_width\n",
// x, x->gl_editor->canvas_cnct_inlet_tag);
gui_vmess("gui_highlight_io", "ss",
canvas_tag(x),
gui_vmess("gui_highlight_io", "xs",