/[gtk-cffi]/gtk-cffi/examples/ex3-flash-button.lisp
ViewVC logotype

Diff of /gtk-cffi/examples/ex3-flash-button.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by rklochkov, Fri Aug 26 17:16:13 2011 UTC revision 1.3 by rklochkov, Sun Oct 7 12:02:10 2012 UTC
# Line 31  Line 31 
31    
32  (setf button (make-instance 'button :label "Click Me!"))  (setf button (make-instance 'button :label "Click Me!"))
33  (setf (size-request button) '(80 32)  (setf (size-request button) '(80 32)
34        (color button :background t) "#FFCC66")        (color button :type :bg) "#FFCC66")
35    
36  (defvar *TIMEOUT*)  (defvar *TIMEOUT*)
37    
# Line 46  Line 46 
46    
47  (realize window)  (realize window)
48    
49  (defparameter *ORG-BG* (color window :background t))  (defparameter *ORG-BG* (color window :type :bg))
50    
51  (let (i)  (let (i)
52    (defun flash (button bgcolor)    (defun flash (button bgcolor)
53      (setf (color button :background t) (if i *ORG-BG* bgcolor))      (setf (color button :type :bg) (if i *ORG-BG* bgcolor))
54      (setf i (not i)) t))      (setf i (not i)) t))
55    
56  (setf *TIMEOUT* (timeout-add 200 #'flash :data (list button "#FFCC66")))  (setf *TIMEOUT* (timeout-add 200 #'flash :data (list button "#FFCC66")))

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.5