wl

Unnamed repository; edit this file 'description' to name the repository.
git clone https://logand.com/git/wl.git/
Log | Files | Refs | LICENSE

swt2.l (518B)


      1 # http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet245.java?view=co
      2 
      3 (load "swt.l")
      4 
      5 (setq D (jnew Display)
      6       S (jnew Shell D) )
      7 
      8 (de w (R) (jnum (jfield R 'width)))
      9 (de h (R) (jnum (jfield R 'height)))
     10       
     11 (de onPaint (M E)
     12    (job '((S . `S))
     13       (let R (S 'getClientArea)
     14          ((jfield E 'gc) 'drawOval 0 0 (1- (w R)) (1- (h R))) ) ) )
     15 
     16 (S 'addPaintListener (jproxy NIL 'onPaint PaintListener))
     17 (S 'setBounds 10 10 200 200)
     18 (S 'open)
     19 
     20 (swtLoop D S)