Max 5 API Reference
00001 // ext_drag.h copyright 2008 cycling '74 00002 00003 #ifndef __EXT_DRAG_H__ 00004 00005 #define __EXT_DRAG_H__ 00006 00007 BEGIN_USING_C_LINKAGE 00008 00009 char *jdrag_getitemstring(t_object *dg, long index, long quote, long backslash); 00010 t_object *jdrag_getobject(t_object *dg, long index); 00011 void jdrag_getlocation(t_object *dg, long index, double *xpos, double *ypos); 00012 t_object *jdrag_createobject(t_object *dg, t_object *pv, void *d); 00013 t_object *jdrag_createnewobj(t_object *dg, t_object *pv, char *classname, char *str); 00014 t_object *jdrag_createmessage(t_object *dg, t_object *pv, t_symbol *msg, long ac, t_atom *av); 00015 00016 00017 // dg the jdrag object 00018 // rcv the jbox which will have a message called when the dragged thing is released 00019 // msg the message name that will be sent to the box when the dragged thing is released 00020 // desc a description to be displayed in a contextual menu for the drop action 00021 // arg user data to be passed to the drag function (for example, the t_symbol* of the message to call in the case of jdrag_box_add()) 00022 void jdrag_add(t_object *dg, t_object *rcv, t_symbol *msg, char *desc, void *arg); 00023 00024 00025 long jdrag_matchdragrole(t_object *dx, t_symbol *role, long flags); 00026 00027 00028 void jdrag_setboxlocation(t_object *dg, t_object *box); 00029 00030 00031 void jdrag_object_add(t_object *dg, t_object *obj, t_symbol *msg); 00032 00033 // a wrapper around jbox_add() used by most ui objects; demonstrated in the pictmeter~ example project in the sdk 00034 void jdrag_box_add(t_object *dg, t_object *box, t_symbol *msg); 00035 00036 00037 END_USING_C_LINKAGE 00038 00039 #endif // __EXT_DRAG_H__
Copyright © 2008, Cycling '74