[Gridflow-cvs] [svn] commit: r4881 - in /trunk: ChangeLog src/quartz.m

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Dec 17 23:26:25 EST 2009


Author: pboivin
Date: Thu Dec 17 23:26:23 2009
New Revision: 4881

Log:
set_geometry method

Modified:
    trunk/ChangeLog
    trunk/src/quartz.m

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Thu Dec 17 23:26:23 2009
@@ -13,6 +13,7 @@
  * [#]: avoid grid-abort in case of wrong dimensions
  * [#in grid]: fixed end-of-file detection
  * ./configure: replaced pentium detection code
+ * [#io.quartz]: title, move and set_geometry methods compatible with [#io.x11]
 
 version 0.9.6 (2009.11.05):
 

Modified: trunk/src/quartz.m
==============================================================================
--- trunk/src/quartz.m (original)
+++ trunk/src/quartz.m Thu Dec 17 23:26:23 2009
@@ -154,6 +154,7 @@
 	void call ();
 	\decl 0 title (string title="");
 	\decl 0 move (int y, int x);
+	\decl 0 set_geometry (int y, int x, int sy, int sx);
 	\grin 0
 };
 
@@ -225,6 +226,13 @@
     [window setFrameTopLeftPoint: pos];
 }
 
+\def 0 set_geometry (int y, int x, int sy, int sx) {
+    int new_y;
+    new_y = [[[NSScreen screens] objectAtIndex:0] frame].size.height - 22 - y - sy;
+    NSRect r = {{x, new_y}, {sx, sy}};
+    [window setFrame: r display: YES];
+}
+
 \end class FormatQuartz {
 	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 	distantFuture = [NSDate distantFuture];



More information about the Gridflow-cvs mailing list