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

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Apr 19 15:26:13 EDT 2010


Author: pboivin
Date: Mon Apr 19 15:26:10 2010
New Revision: 5477

Log:
add 'hidecursor' and 'setcursor' for [#io.quartz]

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

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Mon Apr 19 15:26:10 2010
@@ -26,6 +26,7 @@
  * [#camera]: added colorspace rgba
  * [#io.quartz]: added support for keypress and keyrelease
  * [#io.quartz]: added 'menubar' method (show/hide system menubar on OSX)
+ * [#io.quartz]: added hidecursor and setcursor
  * [#io.quicktimecamera]: colorspace rgba's alpha=255 now.
  * [#io.quicktimecamera]: added colorspaces y, yuv, rgb.
  * [#io.videodev] and [#camera]: removed attribute 'transfer'

Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Mon Apr 19 15:26:10 2010
@@ -17,10 +17,7 @@
      vite, la détection de mouvement de various_effects.pd fait un clignotement. est-ce qu'on peut vraiment avoir 30 fps
      présentement ? est-ce que ça dépend de la dernière app qui a ouvert la caméra avant gridflow ? faire des tests avec
      [pix_video] et [#camera] en alternance.)
-[x] [#io.quartz] keypress/keyrelease
-[L] [#io.quartz] setcursor/hidecursor
 [ ] [#io.quartz] fullscreen mode
-[x] [#io.quartz] hide menubar
 [ ] [#io.quicktime (apple) out] grid, codec, quality.
 [ ] add [cv/#SVD] etc (-lcv) to OSX packages
 [ ] on PPC, retest [#to_pix] with alpha etc...

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 Mon Apr 19 15:26:10 2010
@@ -1,61 +1,70 @@
-#N canvas 618 22 632 655 10;
+#N canvas 630 22 632 752 10;
 #X obj 0 0 doc_h;
-#X obj 3 70 doc_c;
-#X obj 0 623 doc_f;
-#X obj 44 40 #out quartz;
-#X obj 3 110 doc_i 1;
-#X obj 3 374 doc_o 1;
-#X obj 14 140 doc_ii 0;
-#X obj 97 140 doc_m i0 grid;
-#X text 134 40 video output for OSX (when running without Apple X11)
+#X obj 3 66 doc_c;
+#X obj 0 724 doc_f;
+#X obj 44 37 #out quartz;
+#X obj 3 106 doc_i 1;
+#X obj 3 449 doc_o 1;
+#X obj 14 136 doc_ii 0;
+#X obj 97 136 doc_m i0 grid;
+#X text 134 37 video output for OSX (when running without Apple X11)
 ;
-#X obj 14 404 doc_oo 0;
-#X text 232 140 with [#out] \, displays a frame;
-#X obj 97 404 doc_m o0 grid;
-#X text 232 404 grid(rows columns rgb);
-#X obj 3 603 doc_also;
-#X obj 103 603 doc_link #io.sdl;
-#X obj 231 603 doc_link #io.x11;
-#X obj 97 527 doc_m o0 keypress;
-#X obj 97 549 doc_m o0 keyrelease;
-#X obj 97 571 doc_m o0 position;
-#X obj 97 320 doc_m i0 title;
-#X obj 97 276 doc_m i0 move;
-#X text 232 342 set window title;
-#X text 232 320 \$1=title;
-#X text 232 298 move window;
-#X text 232 276 \$1=y_position \, \$2=x_position;
-#X obj 97 162 doc_m i0 menubar;
-#X text 232 162 \$1=1 \, show system menubar (default);
-#X text 232 184 \$1=0 \, hide system menubar;
-#X text 232 206 \$1=-1 \, show system menubar only if the user moves
-the mouse into the screen area where it would ordinarily be;
-#X text 232 492 The values must be in range 0-255 \, or else they will
+#X obj 14 479 doc_oo 0;
+#X obj 97 479 doc_m o0 grid;
+#X text 232 479 grid(rows columns rgb);
+#X obj 3 704 doc_also;
+#X obj 103 704 doc_link #io.sdl;
+#X obj 175 704 doc_link #io.x11;
+#X obj 97 628 doc_m o0 keypress;
+#X obj 97 650 doc_m o0 keyrelease;
+#X obj 97 672 doc_m o0 position;
+#X obj 97 395 doc_m i0 title;
+#X obj 97 294 doc_m i0 move;
+#X text 232 395 \$1=title;
+#X text 232 294 \$1=y_position \, \$2=x_position;
+#X obj 97 180 doc_m i0 menubar;
+#X text 232 593 The values must be in range 0-255 \, or else they will
 be "wrapped".;
-#X text 232 426 Resizes the window to the size of the grid \; Encodes
+#X text 232 501 Resizes the window to the size of the grid \; Encodes
 that grid in the display's pixel format \; Also displays it if autodraw
 is greater than 0 \;;
-#X text 232 470 Also displays it if autodraw is greater than 0 \;;
-#X text 232 448 Encodes that grid in the display's pixel format \;
+#X text 232 571 Also displays it if autodraw is greater than 0 \;;
+#X text 232 549 Encodes that grid in the display's pixel format \;
 ;
-#X text 232 241 This behaviour is only effective when a GridFlow window
+#X text 232 259 This behaviour is only effective when a GridFlow window
 is active and not when another Pd window is.;
-#X obj 252 557 doc_link #io.x11;
-#X text 252 535 see also:;
-#X obj 233 524 doc_accolade;
-#X connect 7 1 10 0;
-#X connect 11 1 12 0;
-#X connect 11 1 30 0;
-#X connect 11 1 29 0;
-#X connect 11 1 32 0;
-#X connect 11 1 31 0;
-#X connect 13 1 14 0;
-#X connect 13 1 15 0;
-#X connect 19 1 22 0;
+#X obj 259 650 doc_link #io.x11;
+#X text 252 630 see also:;
+#X obj 236 625 doc_accolade;
+#X obj 97 158 doc_m i0 hidecursor;
+#X obj 97 338 doc_m i0 setcursor;
+#X text 232 136 With [#out] \, displays a frame.;
+#X text 232 158 Hide mouse cursor for any GridFlow window.;
+#X text 232 180 \$1=1 \, Show system menubar. (default);
+#X text 232 202 \$1=0 \, Hide system menubar.;
+#X text 232 224 \$1=-1 \, Show system menubar only if the user moves
+the mouse into the screen area where it would ordinarily be.;
+#X text 232 316 Move window.;
+#X text 232 417 Set window title.;
+#X text 232 338 \$1=any float;
+#X text 232 360 If the mouse cursor is hidden \, "setcursor 0" will
+bring it back.;
+#X connect 7 1 33 0;
+#X connect 10 1 11 0;
+#X connect 10 1 24 0;
+#X connect 10 1 23 0;
+#X connect 10 1 26 0;
+#X connect 10 1 25 0;
+#X connect 12 1 13 0;
+#X connect 12 1 14 0;
+#X connect 18 1 20 0;
+#X connect 18 1 39 0;
 #X connect 19 1 21 0;
-#X connect 20 1 24 0;
-#X connect 20 1 23 0;
-#X connect 25 1 26 0;
-#X connect 25 1 27 0;
-#X connect 25 1 28 0;
-#X connect 25 1 33 0;
+#X connect 19 1 38 0;
+#X connect 22 1 35 0;
+#X connect 22 1 36 0;
+#X connect 22 1 37 0;
+#X connect 22 1 27 0;
+#X connect 31 1 34 0;
+#X connect 32 1 40 0;
+#X connect 32 1 41 0;

Modified: trunk/src/quartz.m
==============================================================================
--- trunk/src/quartz.m (original)
+++ trunk/src/quartz.m Mon Apr 19 15:26:10 2010
@@ -114,6 +114,8 @@
 	\decl 0 menubar (int state);
 	\decl 0 move (int y, int x);
 	\decl 0 set_geometry (int y, int x, int sy, int sx);
+	\decl 0 hidecursor ();
+	\decl 0 setcursor (int c);
 	\decl 0 loadbang () {outlet_anything(outlets[0],gensym("nogrey"),0,0);}
 	\grin 0
 };
@@ -289,7 +291,6 @@
 static NSDate *distantFuture, *distantPast;
 
 void FormatQuartz::call() {
-	BOOL wasMouseEvent = NO;
 	NSEvent *e = [NSApp nextEventMatchingMask: NSAnyEventMask
 		// untilDate: distantFuture // blocking
 		untilDate: distantPast      // nonblocking
@@ -376,6 +377,10 @@
 	[window setFrame: r display: YES];
 }
 
+\def 0 hidecursor () { [NSCursor hide]; }
+
+\def 0 setcursor (int c) { [NSCursor unhide]; }
+
 \end class FormatQuartz {
 	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 	distantFuture = [NSDate distantFuture];



More information about the Gridflow-cvs mailing list