[Gridflow-cvs] [svn] commit: r4872 - in /trunk: doc/flow_classes/#io.quartz-help.pd src/quartz.m

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Dec 8 15:51:07 EST 2009


Author: pboivin
Date: Tue Dec  8 15:51:02 2009
New Revision: 4872

Log:
move method compatible with #io.x11

Modified:
    trunk/doc/flow_classes/#io.quartz-help.pd
    trunk/src/quartz.m

Modified: trunk/doc/flow_classes/#io.quartz-help.pd
==============================================================================
--- trunk/doc/flow_classes/#io.quartz-help.pd (original)
+++ trunk/doc/flow_classes/#io.quartz-help.pd Tue Dec  8 15:51:02 2009
@@ -1,13 +1,24 @@
-#N canvas 0 0 632 279 10;
+#N canvas 169 22 632 349 10;
 #X obj 0 0 doc_h;
 #X obj 3 70 doc_c;
-#X obj 0 250 doc_f;
+#X obj 0 320 doc_f;
 #X obj 44 40 #out quartz;
 #X obj 3 110 doc_i 1;
-#X obj 3 190 doc_o 1;
+#X obj 3 260 doc_o 1;
 #X obj 14 140 doc_ii 0;
 #X obj 97 140 doc_m i0 grid;
-#X obj 97 160 doc_m i0 title;
-#X text 264 34 video output for OSX (when running without Apple X11)
+#X obj 97 206 doc_m i0 title;
+#X text 134 40 video output for OSX (when running without Apple X11)
 ;
-#X obj 14 220 doc_oo 0;
+#X obj 14 290 doc_oo 0;
+#X obj 97 162 doc_m i0 move;
+#X text 232 140 with [#out] \, displays a frame;
+#X text 232 228 set window title;
+#X text 232 206 \$1=title;
+#X text 232 162 \$1=x_position \, \$2=y_position;
+#X text 232 184 move window;
+#X connect 7 1 12 0;
+#X connect 8 1 14 0;
+#X connect 8 1 13 0;
+#X connect 11 1 15 0;
+#X connect 11 1 16 0;

Modified: trunk/src/quartz.m
==============================================================================
--- trunk/src/quartz.m (original)
+++ trunk/src/quartz.m Tue Dec  8 15:51:02 2009
@@ -152,6 +152,7 @@
 	}
 	void call ();
 	\decl 0 title (string title="");
+	\decl 0 move (int y, int x);
 	\grin 0
 };
 
@@ -217,6 +218,12 @@
     [window setTitle: str];
 }
 
+\def 0 move (int y, int x) {
+    int new_y = [[[NSScreen screens] objectAtIndex:0] frame].size.height - y;
+    NSPoint pos = { x, new_y };
+    [window setFrameTopLeftPoint: pos];
+}
+
 \end class FormatQuartz {
 	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 	distantFuture = [NSDate distantFuture];



More information about the Gridflow-cvs mailing list