]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.backend.gtk: only set up event sources when we are deploying with io level 3
authorPhilipp Brüschweiler <blei42@gmail.com>
Thu, 22 Jul 2010 21:45:08 +0000 (23:45 +0200)
committerPhilipp Brüschweiler <blei42@gmail.com>
Thu, 22 Jul 2010 21:45:08 +0000 (23:45 +0200)
basis/ui/backend/gtk/gtk.factor
extra/hello-ui/deploy.factor

index 4d72abdd5ea6fd1dc5f17281f7c4b156a6c6e380..441e02a04fd91de6943159bc7d677c39efe6f7a7 100644 (file)
@@ -1,17 +1,15 @@
 ! Copyright (C) 2010 Anton Gorenko, Philipp Brüschweiler.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien.accessors alien.c-types alien.data
-alien.strings arrays assocs classes.struct command-line destructors
-gdk.ffi gdk.gl.ffi glib.ffi gobject.ffi gtk.ffi gtk.gl.ffi
-io.backend.unix.multiplexers io.encodings.utf8 io.thread kernel libc
-literals locals math math.bitwise math.order math.vectors namespaces
-sequences strings system threads ui ui.backend ui.clipboards
-ui.commands ui.event-loop ui.gadgets ui.gadgets.menus
-ui.gadgets.private ui.gadgets.worlds ui.gestures ui.pixel-formats
-ui.pixel-formats.private ui.private ;
-RENAME: windows ui.private => ui:windows
-EXCLUDE: ui.gadgets.editors => change-caret ;
-RENAME: change-caret ui.gadgets.editors => editors:change-caret
+alien.strings arrays assocs classes.struct command-line
+destructors gdk.ffi gdk.gl.ffi glib.ffi gobject.ffi gtk.ffi
+gtk.gl.ffi io.backend io.backend.unix.multiplexers
+io.encodings.utf8 io.thread kernel libc literals locals math
+math.bitwise math.order math.vectors namespaces sequences
+strings system threads ui ui.backend ui.clipboards ui.commands
+ui.event-loop ui.gadgets ui.gadgets.editors ui.gadgets.menus
+ui.gadgets.private ui.gadgets.worlds ui.gestures
+ui.pixel-formats ui.pixel-formats.private ui.private ;
 IN: ui.backend.gtk
 
 SINGLETON: gtk-ui-backend
@@ -229,7 +227,12 @@ CONSTANT: poll-fd-events
         mx get fd>> >>fd
         poll-fd-events >>events ;
 
-: init-io-event-source ( -- )
+HOOK: init-io-event-source io-backend ( -- )
+
+M: c-io-backend init-io-event-source
+    ;
+
+M: object init-io-event-source
     GSourceFuncs malloc-struct &free
         [ io-source-prepare ] GSourceFuncsPrepareFunc >>prepare
         [ io-source-check ] GSourceFuncsCheckFunc >>check
index ceff9857cb4b9e77e1af419521a67526281b7a4e..cf851f5a95e9f7c9201607a437f72dfa93212d86 100644 (file)
@@ -5,7 +5,7 @@ H{
     { deploy-c-types? f }
     { deploy-unicode? f }
     { "stop-after-last-window?" t }
-    { deploy-io 1 }
+    { deploy-io 2 }
     { deploy-reflection 1 }
     { deploy-word-props? f }
     { deploy-math? t }