Update of /cvsroot/pure-data/externals/hcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13978
Added Files: window_name.c window_name-help.pd Log Message: created object to get current window name so you can change it's tk options
--- NEW FILE: window_name.c --- #include <stdio.h> #include <string.h> #include <m_pd.h> #include <g_canvas.h>
#define DEBUG(x)
static t_class *window_name_class;
typedef struct _window_name { t_object x_obj; t_symbol *windowname; } t_window_name;
static void window_name_bang(t_window_name *x) { outlet_symbol(x->x_obj.ob_outlet,x->windowname); }
static void *window_name_new(void) { t_window_name *x = (t_window_name *)pd_new(window_name_class); char buf[MAXPDSTRING];
snprintf(buf, MAXPDSTRING, ".x%lx", (long unsigned int)canvas_getcurrent()); x->windowname = gensym(buf);
outlet_new(&x->x_obj, &s_symbol);
return(x); }
void window_name_setup(void) { window_name_class = class_new(gensym("window_name"), (t_newmethod)window_name_new, NULL, sizeof(t_window_name), 0, 0);
class_addbang(window_name_class, (t_method)window_name_bang); }
--- NEW FILE: window_name-help.pd --- #N canvas 431 431 476 365 10; #X obj 175 202 sys_gui; #X symbolatom 290 96 0 0 0 0 - - -; #X obj 274 27 loadbang; #X obj 175 143 pack float symbol; #X obj 110 83 hsl 128 15 0.1 1 1 1 empty empty window_alpha -2 -8 0 10 -204800 -1 -1 12700 1; #X floatatom 107 118 5 0 0 0 - - -; #X msg 175 172 wm attributes $2 -alpha $1; #X text 43 256 for more options:; #X obj 62 279 pddp/pddplink http://tcl.tk/man/tcl8.4/TkCmd/wm.htm; #X text 164 229 alpha does not work with X11 :(; #X obj 274 64 window_name; #X connect 2 0 10 0; #X connect 3 0 6 0; #X connect 4 0 3 0; #X connect 4 0 5 0; #X connect 6 0 0 0; #X connect 10 0 3 1; #X connect 10 0 1 0;