Commit 75205b91 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

Initial commit (WIP, currently crashing)

* migrating to Linux for debugging
parent ca0bd3a0
......@@ -528,7 +528,7 @@ static void knob_click(t_knob *x, t_floatarg xpos, t_floatarg ypos,
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
knob_bang(x);
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)knob_motion,
0, 0, xpos, ypos);
0, 0, xpos, ypos, 0);
}
static int knob_newclick(t_gobj *z, struct _glist *glist,
......
......@@ -541,7 +541,7 @@ static int envgen_newclick(t_envgen *x, struct _glist *glist,
envgen_next_doodle(x, glist, xpos, ypos);
glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) envgen_motion,
(t_glistkeyfn) envgen_key, 0, xpos, ypos);
(t_glistkeyfn) envgen_key, 0, xpos, ypos, 0);
x->resizing = 0;
if (x->resizeable && (xpos > wxpos + x->w.width) &&
......
......@@ -366,7 +366,7 @@ static void cube_sphere_click(t_cube_sphere *x, t_floatarg xpos, t_floatarg ypos
x->x_sel_index = sel;
x->x_pos_x = x->x_pix_src_x[sel];
x->x_pos_y = x->x_pix_src_y[sel];
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)cube_sphere_motion, 0, 0, xpos, ypos);
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)cube_sphere_motion, 0, 0, xpos, ypos, 0);
}
}
}
......
......@@ -232,7 +232,7 @@ static int iem_event_click(t_gobj *z, struct _glist *glist, int xpix, int ypix,
if(doit)
{
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)iem_event_motion, iem_event_key, 0, (t_float)xpix, (t_float)ypix);
(t_glistmotionfn)iem_event_motion, iem_event_key, 0, (t_float)xpix, (t_float)ypix, 0);
outlet_anything(x->x_gui.x_obj.ob_outlet, x->x_dragg_x_y, 2, x->x_at_out);
if(x->x_gui.x_fsf.x_snd_able && x->x_gui.x_snd->s_thing)
......
......@@ -716,7 +716,7 @@ static void numberbox_matrix_click(t_numberbox_matrix *x, t_floatarg xpos, t_flo
t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
{
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)numberbox_matrix_motion, numberbox_matrix_key, 0, xpos, ypos);
(t_glistmotionfn)numberbox_matrix_motion, numberbox_matrix_key, 0, xpos, ypos, 0);
}
static int numberbox_matrix_newclick(t_gobj *z, struct _glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit)
......
......@@ -440,7 +440,7 @@ static void room_sim_2d_click(t_room_sim_2d *x, t_floatarg xpos, t_floatarg ypos
x->x_pos_x = x->x_pix_src_x[sel];
x->x_pos_y = x->x_pix_src_y[sel];
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)room_sim_2d_motion, 0, 0, xpos, ypos);
(t_glistmotionfn)room_sim_2d_motion, 0, 0, xpos, ypos, 0);
}
}
......
......@@ -532,7 +532,7 @@ static void room_sim_3d_click(t_room_sim_3d *x, t_floatarg xpos, t_floatarg ypos
x->x_pos_x = x->x_pix_src_x[sel];
x->x_pos_y = x->x_pix_src_y[sel];
x->x_pos_z = x->x_pix_src_z[sel];
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)room_sim_3d_motion, 0, 0, xpos, ypos);
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)room_sim_3d_motion, 0, 0, xpos, ypos, 0);
}
}
......
......@@ -195,7 +195,7 @@ static void comment_dograb(t_comment *x)
Here we use it just to prevent backspace from erasing entire text.
This has to be done also when we are already active, because
after being clicked at we have lost our previous grab. */
glist_grab(x->x_glist, (t_gobj *)x, 0, comment_grabbedkey, 0, 0, 0);
glist_grab(x->x_glist, (t_gobj *)x, 0, comment_grabbedkey, 0, 0, 0, 0);
}
static void comment__bboxhook(t_comment *x, t_symbol *bindsym,
......
......@@ -450,13 +450,13 @@ static void mknob_click(t_mknob *x, t_floatarg xpos, t_floatarg ypos,
if (x->x_gui.x_h<0)
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)mknob_motion_fullcircular, 0, 0, xpos, ypos);
(t_glistmotionfn)mknob_motion_fullcircular, 0, 0, xpos, ypos, 0);
else if (x->x_gui.x_h==0)
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)mknob_motion_circular, 0, 0, xpos, ypos);
(t_glistmotionfn)mknob_motion_circular, 0, 0, xpos, ypos, 0);
else
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)mknob_motion, 0, 0, xpos, ypos);
(t_glistmotionfn)mknob_motion, 0, 0, xpos, ypos, 0);
}
static int mknob_newclick(t_gobj *z, struct _glist *glist,
......
......@@ -1481,7 +1481,7 @@ static int pdp_colorgrid_click(t_gobj *z, struct _glist *glist,
pdp_colorgrid_output_current(x);
pdp_colorgrid_draw_update(x, glist);
glist_grab(glist, &x->x_obj.te_g, (t_glistmotionfn)pdp_colorgrid_motion,
0, 0, xpix, ypix);
0, 0, xpix, ypix, 0);
}
return (1);
}
......
......@@ -518,7 +518,7 @@ static int breakpoints_newclick(t_breakpoints *x, struct _glist *glist,
breakpoints_next_doodle(x,glist,xpos,ypos);
glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) breakpoints_motion,
(t_glistkeyfn) breakpoints_key, 0, xpos, ypos);
(t_glistkeyfn) breakpoints_key, 0, xpos, ypos, 0);
x->w.shift = shift;
breakpoints_followpointer(x,glist);
......@@ -544,7 +544,7 @@ static int breakpoints_newclick(t_breakpoints *x, struct _glist *glist,
breakpoints_next_doodle(x,glist,xpos,ypos);
glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) breakpoints_motion,
(t_glistkeyfn) breakpoints_key, 0, xpos, ypos);
(t_glistkeyfn) breakpoints_key, 0, xpos, ypos, 0);
x->resizing = 0;
if (x->resizeable && (xpos > wxpos + x->w.width) &&
......
......@@ -670,7 +670,7 @@ static int audience_click(t_gobj *z, struct _glist *glist,
}
audience_draw_update(x, glist);
glist_grab(glist, &x->x_obj.te_g, (t_glistmotionfn)audience_motion,
0, 0, xpix, ypix);
0, 0, xpix, ypix, 0);
}
return (1);
}
......
......@@ -880,7 +880,7 @@ static int cooled_click(t_gobj *z, struct _glist *glist,
x->x_alted = alt;
// activate motion callback
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)cooled_motion,
0, 0, xpix, ypix );
0, 0, xpix, ypix, 0 );
// draw insertion line
if ( glist_isvisible( x->x_glist ) )
......
......@@ -510,7 +510,7 @@ static int grid_click(t_gobj *z, struct _glist *glist,
grid_output_current(x);
grid_draw_update(x, glist);
glist_grab(glist, &x->x_obj.te_g, (t_glistmotionfn)grid_motion,
0, 0, xpix, ypix);
0, 0, xpix, ypix, 0);
}
return (1);
}
......
......@@ -640,7 +640,7 @@ static int playlist_click(t_gobj *z, struct _glist *glist,
}
x->x_glist = glist;
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)playlist_motion,
NULL, NULL, xpix, ypix );
NULL, NULL, xpix, ypix, 0 );
}
return (1);
}
......
......@@ -417,7 +417,7 @@ static int scratcher_click(t_gobj *z, struct _glist *glist,
{
// activate motion callback
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)scratcher_motion,
0, 0, xpix, ypix );
0, 0, xpix, ypix, 0 );
x->x_readspeed=0.;
x->x_motioned = 1;
if ( x->x_showspeed )
......
......@@ -426,7 +426,7 @@ static int scrolllist_click(t_gobj *z, struct _glist *glist,
}
x->x_glist = glist;
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)scrolllist_motion,
NULL, NULL, xpix, ypix );
NULL, NULL, xpix, ypix, 0 );
}
return (1);
}
......
......@@ -1116,7 +1116,7 @@ static int sonogram_click(t_gobj *z, struct _glist *glist,
x->x_alted = alt;
// activate motion callback
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)sonogram_motion,
0, 0, xpix, ypix );
0, 0, xpix, ypix, 0 );
if ( shift && alt && (x->x_xstartcapture != x->x_xendcapture ) )
{
......
......@@ -1857,8 +1857,8 @@ function gui_canvas_cursor(cid, pd_event_type) {
function canvas_sendkey(cid, state, evt, char_code, repeat) {
var shift = evt.shiftKey ? 1 : 0,
repeat_number = repeat ? 1 : 0;
//post("canvas_sendkey state=" + state + " evt=" + evt +
// " char_code=<" + char_code + "> repeat=" + repeat);
post("canvas_sendkey state=" + state + " evt=" + evt +
" char_code=<" + char_code + "> repeat=" + repeat + " shift=" + shift);
pdsend(cid, "key", state, char_code, shift, 1, repeat_number);
}
......@@ -2964,7 +2964,7 @@ function gui_text_set (cid, tag, text) {
function gui_text_set_mynumbox (cid, tag, text, active) {
gui(cid).get_elem(tag + "text", function(e) {
//post("gui_text_set_mynumbox " + tag + " " + text + " " + active);
post("gui_text_set_mynumbox " + tag + " " + text + " " + active);
text = text.trim();
e.textContent = "";
text_to_tspans(cid, e, text);
......
......@@ -86,7 +86,9 @@ typedef struct _iemgui
t_scalehandle *x_handle; //24
t_scalehandle *x_lhandle; //19
int x_vis; //bool //64 /* is the object drawn? */
int x_changed; //bool //30 /* has the value changed so that we need to do graphic update */
int x_changed; //bool //30 /* has the value changed so that we need to do graphic update
/* in numbox we also use it to signify when the activated value
has been changed and clipped */
// grep -w "$1" *.[ch]|wc -l
t_glist *x_selected; // 24 matches
......@@ -197,7 +199,9 @@ typedef struct _my_numbox
int x_focused; /* helps us determine when and how we are editing value
0 no focus, 1 keyboard focus, 2 mouse focus */
int x_log_height;
int x_drawstyle; /* 0 default, 1 just frame, 2, just arrow, 3 number only */
int x_drawstyle; /* 0 default, 1 just frame, 2, just arrow, 3 number only */
int x_dragged; /* whether the object has been dragged since it was clicked
we use this to fine-tune the exclusive focus */
} t_my_numbox;
extern int sys_noloadbang;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment