21 typedef struct _unfocus{
27 void *unfocus_new(t_symbol *msg,
long argc, t_atom *argv);
28 void unfocus_assist(t_unfocus *x,
void *b,
long msg,
long arg,
char *dst);
29 void unfocus_bang(t_unfocus *x);
33 static t_class* sUnfocusClass;
39 int JAMOMA_EXPORT_MAXOBJ
main(
void)
41 ClassPtr c = class_new(
"j.unfocus",(method)unfocus_new, (method)NULL,
sizeof(t_unfocus), (method)0L, A_GIMME, 0);
43 common_symbols_init();
44 class_addmethod(c, (method)unfocus_bang,
"bang", 0L);
45 class_addmethod(c, (method)unfocus_assist,
"assist", A_CANT, 0L);
47 class_register(_sym_box, c);
56 void *unfocus_new(t_symbol *msg,
long argc, t_atom *argv)
60 x = (t_unfocus*)object_alloc(sUnfocusClass);
73 void unfocus_assist(t_unfocus *x,
void *b,
long msg,
long arg,
char *dst)
77 case 0: strcpy(dst,
"(bang) remove the focus from elsewhere and give it to the patcher view");
break;
82 default: strcpy(dst,
"");
break;
89 void unfocus_bang(t_unfocus *x)
91 t_object* patcher = NULL;
92 t_object* patcherview = NULL;
94 object_obex_lookup(x, gensym(
"#P"), &patcher);
96 patcherview = object_attr_getobj(patcher, _sym_firstview);
99 object_method(patcherview, _sym_select);
int JAMOMA_EXPORT_MAXOBJ main(void)
Set up this class as a Max external the first time an object of this kind is instantiated.