[Gridflow-cvs] [svn] commit: r6087 - in /trunk/src: classes2.cxx classes3.cxx gem.cxx grid.cxx gridflow.cxx opencv.cxx quicktimecamera.cxx sdl.cxx v4l2.cxx videodev.cxx x11.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Fri Aug 13 16:49:27 EDT 2010


Author: matju
Date: Fri Aug 13 16:49:27 2010
New Revision: 6087

Log:
more shortcuts

Modified:
    trunk/src/classes2.cxx
    trunk/src/classes3.cxx
    trunk/src/gem.cxx
    trunk/src/grid.cxx
    trunk/src/gridflow.cxx
    trunk/src/opencv.cxx
    trunk/src/quicktimecamera.cxx
    trunk/src/sdl.cxx
    trunk/src/v4l2.cxx
    trunk/src/videodev.cxx
    trunk/src/x11.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Fri Aug 13 16:49:27 2010
@@ -399,17 +399,8 @@
 		if (!tmp) RAISE("localtime: %s",strerror(errno));
 		char tt[MAXPDSTRING];
 		strftime(tt,MAXPDSTRING,"%a %b %d %H:%M:%S %Z %Y",tmp);
-		t_atom2 a[6];
-		a[0]=tmp->tm_year+1900;
-		a[1]=tmp->tm_mon-1;
-		a[2]=tmp->tm_mday;
-		a[3]=tmp->tm_hour;
-		a[4]=tmp->tm_min;
-		a[5]=tmp->tm_sec;
-		t_atom2 b[3];
-		b[0]=tv.tv_sec/86400;
-		b[1]=mod(tv.tv_sec,86400);
-		b[2]=tv.tv_usec;
+		t_atom2 a[6] = {tmp->tm_year+1900,tmp->tm_mon-1,tmp->tm_mday,tmp->tm_hour,tmp->tm_min,tmp->tm_sec};
+		t_atom2 b[3] = {tv.tv_sec/86400,mod(tv.tv_sec,86400),tv.tv_usec};
 		out[2](6,a);
 		out[1](3,b);
 		send_out(0,strlen(tt),tt);
@@ -588,7 +579,7 @@
 		do_bind(argc-n,argv+n);
 	}
 	\decl 0 bang () {_0_list(0,0);}
-	\decl 0 symbol (t_symbol *s) {t_atom2 a[1]; a[0]=s; _0_list(1,a);}
+	\decl 0 symbol (t_symbol *s) {t_atom2 a[1] = {s}; _0_list(1,a);}
 	\decl 0 list (...) {do_unbind(); do_bind(argc,argv);}
 	void do_bind (int argc, t_atom2 *argv) {
 		ac = argc;
@@ -770,12 +761,7 @@
 \class GFCanvasGetPos : FObject {
 	int n;
 	\constructor (int n=0) {this->n=n;}
-	\decl 0 bang () {MOM;
-		t_atom2 a[2];
-		a[0]=m->gl_obj.te_xpix;
-		a[1]=m->gl_obj.te_ypix;
-		out[0](2,a);
-	}
+	\decl 0 bang () {MOM; t_atom2 a[2] = {m->gl_obj.te_xpix, m->gl_obj.te_ypix}; out[0](2,a);}
 };
 \end class {install("gf/canvas_getpos",1,1);}
 \class GFCanvasSetPos : FObject {
@@ -1087,7 +1073,7 @@
 		if (!canvas_contains(mom,(t_gobj *)s->s_thing)) RAISE("object is not in this canvas");
 		int x1,y1,x2,y2;
 		wb->w_getrectfn((t_gobj *)s->s_thing,mom,&x1,&y1,&x2,&y2);
-		t_atom2 a[4]; a[0]=x1; a[1]=y1; a[2]=x2; a[3]=y2; out[0](4,a);
+		t_atom2 a[4] = {x1,y1,x2,y2}; out[0](4,a);
 	}
 };
 
@@ -1243,6 +1229,7 @@
 	\decl 1 list  (float b) {this->b=b;}};
 \end class {install("inv*",2,1); class_sethelpsymbol(fclass->bfclass,gensym("inv0x2a"));}
 
+extern t_symbol *gridflow_folder; 
 \class GridFlowClass : FObject {
 	\constructor () {}
 	\decl 0 get (t_symbol *s=0) {
@@ -1250,19 +1237,8 @@
 			_0_get(gensym("version"));
 			_0_get(gensym("folder"));
 		}
-		if (s==gensym("version")) {
-			t_atom2 a[3];
-			a[0]=GF_VERSION_A;
-			a[1]=GF_VERSION_B;
-			a[2]=GF_VERSION_C;
-			out[0](s,3,a);
-		}
-		if (s==gensym("folder")) {
-			t_atom2 a[1];
-			extern t_symbol *gridflow_folder;
-			a[0]=gridflow_folder;
-			out[0](s,1,a);
-		}
+		if (s==gensym("version")) {t_atom2 a[3] = {GF_VERSION_A,GF_VERSION_B,GF_VERSION_C}; out[0](s,3,a);}
+		if (s==gensym("folder")) {t_atom2 a[1] = {gridflow_folder}; out[0](s,1,a);}
 	}
 };
 \end class {install("gridflow",1,1);}

Modified: trunk/src/classes3.cxx
==============================================================================
--- trunk/src/classes3.cxx (original)
+++ trunk/src/classes3.cxx Fri Aug 13 16:49:27 2010
@@ -353,8 +353,7 @@
 \class GridMoment : FObject {
 	\constructor (int order=1) {
 		offset.constrain(expect_pair);
-		//t_atom2 a[2] = {t_atom2(0),t_atom2(0)};
-		t_atom a[2]; SETFLOAT(a,0); SETFLOAT(a+1,0);
+		t_atom2 a[2] = {t_atom2(0),t_atom2(0)};
 		offset=new Grid(2,a,int32_e);
 		if (order!=1 && order!=2) RAISE("supports only orders 1 and 2 for now");
 		this->order=order;

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Fri Aug 13 16:49:27 2010
@@ -281,14 +281,11 @@
 	}
 	~GemDead () {/*delete cache; delete state;*/}
 	\decl 0 bang () {
-		t_atom ap[2];
-		SETPOINTER(ap+0,(t_gpointer *)cache); // GemCache
-		SETPOINTER(ap+1,(t_gpointer *)state);
+		t_atom2 ap[2] = {(t_gpointer *)cache,(t_gpointer *)state};
 		out[0](gensym("gem_state"),2,ap);
 	}
 	\decl 0 float (float state) {
-		t_atom ap[1];
-		SETFLOAT(ap,!!state);
+		t_atom2 ap[1] = {!!state};
 		out[0](gensym("gem_state"),1,ap);
 	}
 };

Modified: trunk/src/grid.cxx
==============================================================================
--- trunk/src/grid.cxx (original)
+++ trunk/src/grid.cxx Fri Aug 13 16:49:27 2010
@@ -188,12 +188,7 @@
 
 GridOut::GridOut(FObject *parent_, int woutlet, const Dim &dim_, NumberTypeE nt_) {
 	parent=parent_; dim=dim_; nt=nt_; dex=0; bufi=0; sender=this; fresh=true;
-	t_atom a[1];
-	SETGRIDOUT(a,this);
-	if (parent) {
-		outlet_anything(parent->out[woutlet],s_grid,1,a);
-		if (!dim.prod()) finish();
-	}
+	if (parent) {t_atom2 a[1] = {this}; outlet_anything(parent->out[woutlet],s_grid,1,a); if (!dim.prod()) finish();}
 }
 
 void GridOut::create_buf () {

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Fri Aug 13 16:49:27 2010
@@ -612,13 +612,13 @@
 	t_atom2 argv[ac+1];
 	for (int i=0; i<ac; i++) argv[i+1] = at[i];
 	int argc = handle_braces(ac,argv+1);
-	SETFLOAT(argv+0,winlet);
+	argv[0]=winlet;
 	FMethod m;
 	char buf[64], bof[64];
 
 	sprintf(buf,"_%d_%s",winlet,selector->s_name); m=funcall_lookup(bself,buf); if (m) {m(bself->self,argc  ,argv+1); return;}
-	sprintf(bof,"_n_%s",selector->s_name);         m=funcall_lookup(bself,bof); if (m) {m(bself->self,argc+1,argv  ); return;}
-	m = funcall_lookup(bself,"anything");        if (m) {SETSYMBOL(argv+0,gensym(buf)); m(bself->self,argc+1,argv  ); return;}
+	sprintf(bof,"_n_%s",        selector->s_name); m=funcall_lookup(bself,bof); if (m) {m(bself->self,argc+1,argv  ); return;}
+	m = funcall_lookup(bself,"anything");                  if (m) {argv[0]=gensym(buf); m(bself->self,argc+1,argv  ); return;}
 	pd_error((t_pd *)bself, "method '%s' not found for inlet %d in class '%s'",selector->s_name,winlet,pd_classname(bself));
     } catch (Barf &oozy) {oozy.error(bself,winlet,selector->s_name);}
 }
@@ -845,13 +845,15 @@
 	if (m) class_addmethod(fclass->bfclass,t_method(BFObject_loadbang),gensym("loadbang"),A_NULL);
 }
 
+//static inline const t_atom &convert(const t_atom &x, const t_atom *foo) {return x;}
+
 /* This code handles nested lists because PureData doesn't do it */
-int handle_braces(int ac, t_atom *av) {
+int handle_braces(int ac, t_atom *av_) {
+	t_atom2 *av = (t_atom2 *)av_;
 	int stack[16];
 	int stackn=0;
 	int j=0;
 	t_binbuf *buf = binbuf_new();
-	//startpost("1: "); postatom(ac,av); post("");
 	for (int i=0; i<ac; ) {
 		int close=0;
 		if (av[i].a_type==A_SYMBOL) {
@@ -875,24 +877,23 @@
 					char ss[MAXPDSTRING];
 					int n = min(long(se-s),long(MAXPDSTRING-1));
 					sprintf(ss,"%.*s",n,s);
-					SETSYMBOL(av+j,gensym(ss)); j++; // av[j++] = gensym(s);
+					av[j++]=gensym(ss);
 				}
 			}
 		} else av[j++]=av[i];
 		i++;
 		while (close--) {
-			if (!stackn) {binbuf_free(buf); RAISE("close-paren without open-paren",av[i]);}
+			if (!stackn) {binbuf_free(buf); RAISE("close-paren without open-paren");}
 			t_binbuf *a2 = binbuf_new(); /* leak because there is no deallocation mechanism whatsoever */
 			int j2 = stack[--stackn];
 			binbuf_add(a2,j-j2,av+j2);
 			j=j2;
-			SETLIST(av+j,a2);
+			av[j]=a2;
 			j++;
 		}
 	}
 	binbuf_free(buf);
 	if (stackn) RAISE("too many open-paren (%d)",stackn);
-	//startpost("2: "); postatom(ac,av); post("");
 	return j;
 }
 
@@ -903,15 +904,14 @@
 \def 0 get (t_symbol *s=0) {
 	FClass *fc = fclasses_pd[pd_class(bself)];
 	if (!s) {
-		t_atom a[1];
 		foreach(attr,fc->attrs) {
-			SETSYMBOL(a,gensym((char *)attr->second->name.data()));
+			t_atom2 a[1] = {gensym((char *)attr->second->name.data())};
 			pd_typedmess((t_pd *)bself,gensym("get"),1,a);
 		}
 	} else {
 		FMethod m = funcall_lookup(bself,"___get");
 		if (!m) RAISE("missing ___get");
-		t_atom2 a[1]; SETSYMBOL(a,s); m(this,1,a);
+		t_atom2 a[1] = {s}; m(this,1,a);
 	}
 }
 \def 0 help () {

Modified: trunk/src/opencv.cxx
==============================================================================
--- trunk/src/opencv.cxx (original)
+++ trunk/src/opencv.cxx Fri Aug 13 16:49:27 2010
@@ -177,18 +177,15 @@
 }
 
 void set_atom (t_atom *a, CvPoint &v) {
-	t_binbuf *b = binbuf_new();
-	binbuf_addv(b,"ii",v.y,v.x);
+	t_binbuf *b = binbuf_new(); binbuf_addv(b,"ii",v.y,v.x);
 	SETLIST(a,b);
 }
 void set_atom (t_atom *a, CvSize &v) {
-	t_binbuf *b = binbuf_new();
-	binbuf_addv(b,"ii",v.height,v.width);
+	t_binbuf *b = binbuf_new(); binbuf_addv(b,"ii",v.height,v.width);
 	SETLIST(a,b);
 }
-void set_atom (t_atom *a, CvScalar &scal) {
-	t_binbuf *b = binbuf_new();
-	binbuf_addv(b,"ffff",scal.val[0],scal.val[1],scal.val[2],scal.val[3]);
+void set_atom (t_atom *a, CvScalar &s) {
+	t_binbuf *b = binbuf_new(); binbuf_addv(b,"ffff",s.val[0],s.val[1],s.val[2],s.val[3]);
 	SETLIST(a,b);
 }
 CvPoint  convert (const t_atom &a, CvPoint *)   {USELIST; return cvPoint( GETI(0),GETI(1));}

Modified: trunk/src/quicktimecamera.cxx
==============================================================================
--- trunk/src/quicktimecamera.cxx (original)
+++ trunk/src/quicktimecamera.cxx Fri Aug 13 16:49:27 2010
@@ -339,12 +339,11 @@
 		//Rect r;
 		//OSErr e = SGGetChannelBounds (m_vc,&r);
 		//if (e!=noErr) RAISE("SGGetChannelBounds error");
-		t_atom a[2];
-		//SETFLOAT(a+0,          1); SETFLOAT(a+1,         1); outlet_anything(outlets[0],gensym("minsize"),2,a);
-		//SETFLOAT(a+0,   r.bottom); SETFLOAT(a+1,   r.right); outlet_anything(outlets[0],gensym("maxsize"),2,a);
-		SETFLOAT(a+0,di.minDestHeight); SETFLOAT(a+1,di.minDestWidth); outlet_anything(outlets[0],gensym("minsize"),2,a);
-		SETFLOAT(a+0,di.maxDestHeight); SETFLOAT(a+1,di.maxDestWidth); outlet_anything(outlets[0],gensym("maxsize"),2,a);
-		SETFLOAT(a+0,     rect.bottom); SETFLOAT(a+1,     rect.right); outlet_anything(outlets[0],gensym(   "size"),2,a);
+		//{t_atom2 a[2] = {               1,              1}; out[0](gensym("minsize"),2,a);}
+		//{t_atom2 a[2] = {        r.bottom,        r.right}; out[0](gensym("maxsize"),2,a);}
+		{t_atom2 a[2] =   {di.minDestHeight,di.minDestWidth}; out[0](gensym("minsize"),2,a);}
+		{t_atom2 a[2] =   {di.maxDestHeight,di.maxDestWidth}; out[0](gensym("maxsize"),2,a);}
+		{t_atom2 a[2] =   {     rect.bottom,     rect.right}; out[0](gensym(   "size"),2,a);}
 	}
 }
 

Modified: trunk/src/sdl.cxx
==============================================================================
--- trunk/src/sdl.cxx (original)
+++ trunk/src/sdl.cxx Fri Aug 13 16:49:27 2010
@@ -80,10 +80,7 @@
 }
 
 static void report_pointer () {
-	t_atom a[3];
-	SETFLOAT(a+0,mousey);
-	SETFLOAT(a+1,mousex);
-	SETFLOAT(a+2,mousem);
+	t_atom2 a[3] = {mousey,mousex,mousem};
 	pd_anything(gensym("#sdl")->s_thing,gensym("position"),COUNT(a),a);
 }
 
@@ -106,15 +103,11 @@
 				break;
 			}
 			t_symbol *sel = gensym(const_cast<char *>(event.type==SDL_KEYDOWN ? "keypress" : "keyrelease"));
-			t_atom at[4];
 			mousem &= ~0xFF;
 			mousem |= mod;
-			SETFLOAT(at+0,mousey);
-			SETFLOAT(at+1,mousex);
-			SETFLOAT(at+2,mousem);
 			int k = event.key.keysym.sym;
 			if (k<0 || k>=SDLK_LAST) RAISE("impossible key number %d, SDLK_LAST = %d",k,SDLK_LAST);
-			SETSYMBOL(at+3,keyboard[k] ? keyboard[k] : symprintf("unknown_%d",k));
+			t_atom2 at[4] = {mousey,mousex,mousem, keyboard[k] ? keyboard[k] : symprintf("unknown_%d",k)};
 			pd_anything(gensym("#sdl")->s_thing,sel,4,at);
 		    } break;
 		    case SDL_MOUSEBUTTONDOWN: {mousem |=  (128<<event.button.button); report_pointer();} break;
@@ -131,25 +124,15 @@
 }
 
 static t_clock *cloque;
-
-static void start () {
-	screen=0;
-	if (SDL_Init(SDL_INIT_VIDEO)<0) RAISE("SDL_Init() error: %s",SDL_GetError());
-	atexit(SDL_Quit);
-	resize_window(320,240);
-	cloque = clock_new(&sdl_global_class,(t_method)FormatSDL_call);
-	clock_delay(cloque,0);
-}
-static void stop () {
-	clock_unset(cloque);
-	clock_free(cloque);
-	SDL_Quit();
-}
+static void start ();
+static void stop ();
+
 \class FormatSDL : Format {
 	P<BitPacking> bit_packing;
-	void call ();
-	\decl 0 setcursor (int shape);
-	\decl 0 hidecursor ();
+	void call () {HandleEvent(); clock_delay(cloque,20);}
+	static void call_(FormatSDL *self) {self->call();}
+	\decl 0 setcursor (int shape) {SDL_ShowCursor(SDL_ENABLE);}
+	\decl 0 hidecursor ()         {SDL_ShowCursor(SDL_DISABLE);}
 	\decl 0 title (const char *title) {SDL_WM_SetCaption(title,title);}
 	\decl 0 position   (...) {out[0](gensym("position"),  argc,argv);}
 	\decl 0 keypress   (...) {out[0](gensym("keypress"),  argc,argv);}
@@ -176,9 +159,19 @@
 		if (!--in_use) stop();
 	}
 };
-
-void FormatSDL::call() {HandleEvent(); clock_delay(cloque,20);}
-void FormatSDL_call(FormatSDL *self) {self->call();}
+static void start () {
+	screen=0;
+	if (SDL_Init(SDL_INIT_VIDEO)<0) RAISE("SDL_Init() error: %s",SDL_GetError());
+	atexit(SDL_Quit);
+	resize_window(320,240);
+	cloque = clock_new(&sdl_global_class,(t_method)FormatSDL::call_);
+	clock_delay(cloque,0);
+}
+static void stop () {
+	clock_unset(cloque);
+	clock_free(cloque);
+	SDL_Quit();
+}
 
 GRID_INLET(0) {
 	if (in.dim.n != 3) RAISE("expecting 3 dimensions: rows,columns,channels");
@@ -202,9 +195,6 @@
 	SDL_UpdateRect(screen,0,0,in.dim[1],in.dim[0]);
 } GRID_END
 
-\def 0 setcursor  (int shape) {SDL_ShowCursor(SDL_ENABLE);}
-\def 0 hidecursor ()          {SDL_ShowCursor(SDL_DISABLE);}
-
 \end class FormatSDL {install_format("#io.sdl",2,"");}
 void startup_sdl () {
 	\startall

Modified: trunk/src/v4l2.cxx
==============================================================================
--- trunk/src/v4l2.cxx (original)
+++ trunk/src/v4l2.cxx Fri Aug 13 16:49:27 2010
@@ -184,7 +184,6 @@
 	\attr int channel();
 	\attr int tuner();
 	\decl 0 size (int sy, int sx);
-	\decl 0 transfer (string sym, int queuemax=2);
 
 	\attr t_symbol *colorspace;
 	\attr int32  frequency();
@@ -206,11 +205,9 @@
 	FObject::_0_get(s);
 	// size are abnormal attributes (does not use nested list)
 	if (!s) {
-		t_atom a[2];
-		//SETFLOAT(a+0,cap.minheight); SETFLOAT(a+1,cap.minwidth); out[0](gensym("minsize"),2,a);
-		//SETFLOAT(a+0,cap.maxheight); SETFLOAT(a+1,cap.maxwidth); out[0](gensym("maxsize"),2,a);
-		SETFLOAT(a+0,dim[0]); SETFLOAT(a+1,dim[1]); out[0](gensym("size"),2,a);
-		SETSYMBOL(a,gensym("mmap")); out[0](gensym("transfer"),1,a);
+		//{t_atom2 a[2] = {cap.minheight,cap.minwidth}; out[0](gensym("minsize"),2,a);}
+		//{t_atom2 a[2] = {cap.maxheight,cap.maxwidth}; out[0](gensym("maxsize"),2,a);}
+		{t_atom2 a[2] = {dim[0],dim[1]}; out[0](gensym("size"),2,a);}
 	}
 }
 
@@ -226,8 +223,7 @@
 	if (debug) gfpost(&fmt);
 	WIOCTL(fd, VIDIOC_S_FMT, &fmt);
 	if (int(f.width)!=sy || int(f.height)!=sx)
-                post("note: camera driver rejected (%d %d) resolution in favour of (%d %d)",
-			sy,sx,f.height,f.width);
+                post("note: camera driver rejected (%d %d) resolution in favour of (%d %d)",sy,sx,f.height,f.width);
 	sy = f.height;
 	sx = f.width;
 	palette = f.pixelformat;
@@ -435,18 +431,6 @@
 }
 \def int channel () {return current_channel;}
 
-\def 0 transfer (string sym, int queuemax=2) {
-	RAISE("de que c'est?");
-/*
-	if (sym!="mmap") RAISE("don't know that transfer mode");
-	dealloc_image();
-	alloc_image();
-	queuemax=min(8,min(queuemax,vmbuf.frames));
-	post("transfer mmap with queuemax=%d (max max is vmbuf.frames=%d)", queuemax,vmbuf.frames);
-	this->queuemax=queuemax;
-*/
-}
-
 \def uint16 brightness ()                 {return v4l2_get_control(fd,V4L2_CID_BRIGHTNESS);}
 \def 0      brightness (uint16 brightness){       v4l2_set_control(fd,V4L2_CID_BRIGHTNESS,brightness);}
 \def uint16 hue        ()                 {return v4l2_get_control(fd,V4L2_CID_HUE);}

Modified: trunk/src/videodev.cxx
==============================================================================
--- trunk/src/videodev.cxx (original)
+++ trunk/src/videodev.cxx Fri Aug 13 16:49:27 2010
@@ -309,13 +309,11 @@
 	FObject::_0_get(s);
 	// size are abnormal attributes (does not use nested list)
 	if (!s) {
-		t_atom a[2];
-		SETFLOAT(a+0,vcaps.minheight); SETFLOAT(a+1,vcaps.minwidth); out[0](gensym("minsize"),2,a);
-		SETFLOAT(a+0,vcaps.maxheight); SETFLOAT(a+1,vcaps.maxwidth); out[0](gensym("maxsize"),2,a);
+		{t_atom2 a[2] = {vcaps.minheight,vcaps.minwidth}; out[0](gensym("minsize"),2,a);}
+		{t_atom2 a[2] = {vcaps.maxheight,vcaps.maxwidth}; out[0](gensym("maxsize"),2,a);}
 		string foo = choice_to_s(vp.palette,COUNT(video_palette_choice),video_palette_choice);
-		SETSYMBOL(a,gensym(foo.data()));
-		out[0](gensym("palette"),1,a);
-		SETFLOAT(a+0,dim[0]); SETFLOAT(a+1,dim[1]); out[0](gensym("size"),2,a);
+		{t_atom2 a[1] = {gensym(foo.data())}; out[0](gensym("palette"),1,a);}
+		{t_atom2 a[2] = {dim[0],dim[1]}; out[0](gensym("size"),2,a);}
 	}
 }
 

Modified: trunk/src/x11.cxx
==============================================================================
--- trunk/src/x11.cxx (original)
+++ trunk/src/x11.cxx Fri Aug 13 16:49:27 2010
@@ -107,7 +107,8 @@
 	bool alloc_image (int sx, int sy);
 	void resize_window (int sx, int sy);
 	void open_display(const char *disp_string);
-	void report_pointer(int y, int x, int state);
+	void report_pointer(int y, int x, int state) {t_atom2 a[3] = {y,x,state}; out[0](gensym("position"),COUNT(a),a);}
+
 	void prepare_colormap();
 	Window search_window_tree (Window xid, Atom key, const char *value, int level=0);
 	\constructor (...) {
@@ -380,11 +381,8 @@
 	if (!is_owner) return;
 	XWMHints wmh;
 	char buf[256],*bufp=buf;
-	if (title=="") {
-		sprintf(buf,"GridFlow (%d,%d,%d)",dim[0],dim[1],dim[2]);
-	} else {
-		sprintf(buf,"%.255s",title.data());
-	}
+	if (title=="") sprintf(buf,"GridFlow (%d,%d,%d)",dim[0],dim[1],dim[2]);
+	else           sprintf(buf,"%.255s",title.data());
 	XTextProperty wtitle; XStringListToTextProperty((char **)&bufp, 1, &wtitle);
 	XSizeHints sh;
 	sh.flags=PSize|PMaxSize|PMinSize;
@@ -394,14 +392,6 @@
 	wmh.flags = InputHint;
 	XSetWMProperties(display,window,&wtitle,&wtitle,0,0,&sh,&wmh,0);
 	XFree(wtitle.value); // do i really have to do that?
-}
-
-void FormatX11::report_pointer(int y, int x, int state) {
-	t_atom a[3];
-	SETFLOAT(a+0,y);
-	SETFLOAT(a+1,x);
-	SETFLOAT(a+2,state);
-	out[0](gensym("position"),COUNT(a),a);
 }
 
 void FormatX11::call() {



More information about the Gridflow-cvs mailing list