ui.backend.gtk: only set up event sources when we are deploying with io level 3

db4
Philipp Brüschweiler 2010-07-22 23:45:08 +02:00
parent e70e2ca073
commit 832b55fe89
2 changed files with 16 additions and 13 deletions

View File

@ -1,17 +1,15 @@
! Copyright (C) 2010 Anton Gorenko, Philipp Brüschweiler. ! Copyright (C) 2010 Anton Gorenko, Philipp Brüschweiler.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.accessors alien.c-types alien.data USING: accessors alien.accessors alien.c-types alien.data
alien.strings arrays assocs classes.struct command-line destructors alien.strings arrays assocs classes.struct command-line
gdk.ffi gdk.gl.ffi glib.ffi gobject.ffi gtk.ffi gtk.gl.ffi destructors gdk.ffi gdk.gl.ffi glib.ffi gobject.ffi gtk.ffi
io.backend.unix.multiplexers io.encodings.utf8 io.thread kernel libc gtk.gl.ffi io.backend io.backend.unix.multiplexers
literals locals math math.bitwise math.order math.vectors namespaces io.encodings.utf8 io.thread kernel libc literals locals math
sequences strings system threads ui ui.backend ui.clipboards math.bitwise math.order math.vectors namespaces sequences
ui.commands ui.event-loop ui.gadgets ui.gadgets.menus strings system threads ui ui.backend ui.clipboards ui.commands
ui.gadgets.private ui.gadgets.worlds ui.gestures ui.pixel-formats ui.event-loop ui.gadgets ui.gadgets.editors ui.gadgets.menus
ui.pixel-formats.private ui.private ; ui.gadgets.private ui.gadgets.worlds ui.gestures
RENAME: windows ui.private => ui:windows ui.pixel-formats ui.pixel-formats.private ui.private ;
EXCLUDE: ui.gadgets.editors => change-caret ;
RENAME: change-caret ui.gadgets.editors => editors:change-caret
IN: ui.backend.gtk IN: ui.backend.gtk
SINGLETON: gtk-ui-backend SINGLETON: gtk-ui-backend
@ -229,7 +227,12 @@ CONSTANT: poll-fd-events
mx get fd>> >>fd mx get fd>> >>fd
poll-fd-events >>events ; 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 GSourceFuncs malloc-struct &free
[ io-source-prepare ] GSourceFuncsPrepareFunc >>prepare [ io-source-prepare ] GSourceFuncsPrepareFunc >>prepare
[ io-source-check ] GSourceFuncsCheckFunc >>check [ io-source-check ] GSourceFuncsCheckFunc >>check

View File

@ -5,7 +5,7 @@ H{
{ deploy-c-types? f } { deploy-c-types? f }
{ deploy-unicode? f } { deploy-unicode? f }
{ "stop-after-last-window?" t } { "stop-after-last-window?" t }
{ deploy-io 1 } { deploy-io 2 }
{ deploy-reflection 1 } { deploy-reflection 1 }
{ deploy-word-props? f } { deploy-word-props? f }
{ deploy-math? t } { deploy-math? t }