[Gd-chatter] r11516 - branches/opendylan-melange/gtk-duim

hannes at gwydiondylan.org hannes at gwydiondylan.org
Tue Dec 4 22:58:46 CET 2007


Author: hannes
Date: Tue Dec  4 22:58:45 2007
New Revision: 11516

Modified:
   branches/opendylan-melange/gtk-duim/gtk-draw.dylan
   branches/opendylan-melange/gtk-duim/gtk-events.dylan
   branches/opendylan-melange/gtk-duim/gtk-fonts.dylan
   branches/opendylan-melange/gtk-duim/library.dylan
   branches/opendylan-melange/gtk-duim/module.dylan
Log:
Job: minor
*implement windows-specific stuff in gtk-events
*use font for text-size computation
*fix drawing of text

Modified: branches/opendylan-melange/gtk-duim/gtk-draw.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-draw.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-draw.dylan	Tue Dec  4 22:58:45 2007
@@ -479,7 +479,7 @@
       let s = _start;
       block (break)
 	while (#t)
-	  let e = position(string, '\t', start: s, end: _end) | string.size;
+	  let e = position(string, '\t', start: s, end: _end) | _end;
 	  let substring = copy-sequence(string, start: s, end: e);
           pango-layout-set-text(layout, substring, e - s);
 //          pango-layout-context-changed(layout);

Modified: branches/opendylan-melange/gtk-duim/gtk-events.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-events.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-events.dylan	Tue Dec  4 22:58:45 2007
@@ -23,9 +23,15 @@
  => (timed-out? :: <boolean>)
   //--- We should do something with the timeout
   ignore(timeout);
-  sleep(3);
-  with-gdk-lock
-    gtk-main();
+  if ($os-name == #"win32")
+    with-gdk-lock
+      gtk-main-iteration();
+    end;
+  else
+    sleep(3);
+    with-gdk-lock
+      gtk-main();
+    end;
   end;
   #f;
 end method process-next-event;

Modified: branches/opendylan-melange/gtk-duim/gtk-fonts.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-fonts.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-fonts.dylan	Tue Dec  4 22:58:45 2007
@@ -250,6 +250,7 @@
 	 => (x1 :: <integer>, y1 :: <integer>, 
 	     x2 :: <integer>, y2 :: <integer>)
           let layout = pango-layout-new(gtk-get-pango-context-from-port(_port));
+          pango-layout-set-font-description(layout, font.%font-description);
           pango-layout-set-text(layout,
                                 copy-sequence(string, start: _start, end: _end),
                                 _end - _start); 

Modified: branches/opendylan-melange/gtk-duim/library.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/library.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/library.dylan	Tue Dec  4 22:58:45 2007
@@ -19,7 +19,6 @@
 
   use gtk;
 
-  use stack-walker;
   export gtk-duim;
 
 end library gtk-duim;

Modified: branches/opendylan-melange/gtk-duim/module.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/module.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/module.dylan	Tue Dec  4 22:58:45 2007
@@ -20,8 +20,6 @@
 
   use gtk;
 
-  use stack-walker;
-
   // Basic classes
   export <gtk-port>,
          <gtk-medium>,



More information about the chatter mailing list