Sha256: aaa04207df7f90fc7cf54ffe885ac5e7e58fe35d77dd550eeb402a82ec2ed0a5
Contents?: true
Size: 590 Bytes
Versions: 29
Compression:
Stored size: 590 Bytes
Contents
module Swt class EventLoop def initialize @running = false end # Begins the SWT event loop. Blocks. def start @running = true @display = Swt.display while @running and not @display.disposed? unless read = @display.read_and_dispatch @display.sleep end end @display.dispose end # Lets the even loop run until block returns false def yield_until @display.read_and_dispatch until yield end # Halts the SWT event loop. def stop @running = false end end end
Version data entries
29 entries across 29 versions & 2 rubygems