mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
animation timer support
This commit is contained in:
parent
a95196ebd3
commit
11fce53c94
3 changed files with 55 additions and 22 deletions
|
|
@ -459,6 +459,33 @@ If ON-ORIENTATION-CHANGE-HANDLER is nil unbind the event."))
|
||||||
(defmethod set-on-orientation-change ((obj clog-window) handler)
|
(defmethod set-on-orientation-change ((obj clog-window) handler)
|
||||||
(set-on-event obj "orientationchange" handler))
|
(set-on-event obj "orientationchange" handler))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; request-animation-frame ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(defgeneric request-animation-frame (clog-window)
|
||||||
|
(:documentation "Requests the browser to send an on-animation-frame
|
||||||
|
on the next screen redraw. This event only fires one time per request.
|
||||||
|
The data parementer of the event function contains the time stamp
|
||||||
|
to the millisecond."))
|
||||||
|
|
||||||
|
(defmethod request-animation-frame ((obj clog-window))
|
||||||
|
(execute obj (format nil "requestAnimationFrame(function (s) ~
|
||||||
|
{~A.trigger('clog-animate', s)})"
|
||||||
|
(jquery obj))))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; set-on-animation-frame ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(defgeneric set-on-animation-frame (clog-window on-animation-frame-handler)
|
||||||
|
(:documentation "Set the ON-ANIMATION-FRAME-HANDLER for CLOG-OBJ the data
|
||||||
|
parameter of the function is the time stamp. If
|
||||||
|
ON-ANIMATION-FRAME-HANDLER is nil unbind the event."))
|
||||||
|
|
||||||
|
(defmethod set-on-animation-frame ((obj clog-window) handler)
|
||||||
|
(set-on-event-with-data obj "clog-animate" handler))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;
|
||||||
;; set-on-storage ;;
|
;; set-on-storage ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
||||||
|
|
@ -951,11 +951,7 @@ embedded in a native template application.)"
|
||||||
(open-window generic-function)
|
(open-window generic-function)
|
||||||
(close-window generic-function)
|
(close-window generic-function)
|
||||||
(close-connection generic-function)
|
(close-connection generic-function)
|
||||||
(storage-type type)
|
(request-animation-frame generic-function)
|
||||||
(storage-length generic-function)
|
|
||||||
(storage-key generic-function)
|
|
||||||
(storage-remove generic-function)
|
|
||||||
(storage-element generic-function)
|
|
||||||
|
|
||||||
"CLOG-Window - Events"
|
"CLOG-Window - Events"
|
||||||
(set-on-abort generic-function)
|
(set-on-abort generic-function)
|
||||||
|
|
@ -963,11 +959,21 @@ embedded in a native template application.)"
|
||||||
(set-on-before-unload generic-function)
|
(set-on-before-unload generic-function)
|
||||||
(set-on-hash-change generic-function)
|
(set-on-hash-change generic-function)
|
||||||
(set-on-orientation-change generic-function)
|
(set-on-orientation-change generic-function)
|
||||||
(set-on-storage generic-function)
|
(set-on-animation-frame generic-function)
|
||||||
(move-window-by generic-function)
|
(move-window-by generic-function)
|
||||||
(move-window-to generic-function)
|
(move-window-to generic-function)
|
||||||
(resize-by generic-function)
|
(resize-by generic-function)
|
||||||
(resize-to generic-function))
|
(resize-to generic-function)
|
||||||
|
|
||||||
|
"CLOG-Window - Storage Methods"
|
||||||
|
(storage-type type)
|
||||||
|
(storage-length generic-function)
|
||||||
|
(storage-key generic-function)
|
||||||
|
(storage-remove generic-function)
|
||||||
|
(storage-element generic-function)
|
||||||
|
|
||||||
|
"CLOG-Window - Storage Events"
|
||||||
|
(set-on-storage generic-function))
|
||||||
|
|
||||||
(defsection @clog-document (:title "CLOG Document Objects")
|
(defsection @clog-document (:title "CLOG Document Objects")
|
||||||
"CLOG-Document - CLOG Document Objects"
|
"CLOG-Document - CLOG Document Objects"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue