diff --git a/source/clog-canvas.lisp b/source/clog-canvas.lisp index 1b153ff..a153cec 100644 --- a/source/clog-canvas.lisp +++ b/source/clog-canvas.lisp @@ -1133,9 +1133,9 @@ json array 6 element for 2d or 16 for 3d.")) (make-instance 'clog-matrix :connection-id (clog::connection-id obj) :html-id web-id))) - + ;;; DOMMatrixReadOnly.rotateAxisAngle() - + ;;;;;;;;;;;; ;; rotate ;; ;;;;;;;;;;;; @@ -1195,7 +1195,7 @@ sy sz ox oy oz")) :connection-id (clog::connection-id obj) :html-id web-id))) -;; skewX skewY +;; skewX skewY ;;;;;;;;;;;;;;;;;;;;;; ;; translate-matrix ;; diff --git a/source/clog-window.lisp b/source/clog-window.lisp index ba3a026..3789e2e 100644 --- a/source/clog-window.lisp +++ b/source/clog-window.lisp @@ -459,6 +459,33 @@ If ON-ORIENTATION-CHANGE-HANDLER is nil unbind the event.")) (defmethod set-on-orientation-change ((obj clog-window) 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 ;; ;;;;;;;;;;;;;;;;;;;; diff --git a/source/clog.lisp b/source/clog.lisp index 9c02924..79ea73b 100644 --- a/source/clog.lisp +++ b/source/clog.lisp @@ -772,7 +772,7 @@ embedded in a native template application.)" (create-conic-gradient generic-function) (create-linear-gradient generic-function) (create-radial-gradient generic-function) - (create-pattern generic-function) + (create-pattern generic-function) (draw-image generic-function) (draw-image-from-to generic-function) (ellipse generic-function) @@ -824,11 +824,11 @@ embedded in a native template application.)" (scale-matrix generic-function) (scale3d generic-function) (translate-matrix generic-function) - + "CLOG-Path2d" (clog-path2d class) (create-path2d generic-function) - + "CLOG-Text-Metrics" (clog-text-metrics class) @@ -942,20 +942,16 @@ embedded in a native template application.)" (screen-color-depth generic-function) "CLOG-Window - Methods" - (alert generic-function) - (log-console generic-function) - (log-error generic-function) - (print-window generic-function) - (scroll-by generic-function) - (scroll-to generic-function) - (open-window generic-function) - (close-window generic-function) - (close-connection generic-function) - (storage-type type) - (storage-length generic-function) - (storage-key generic-function) - (storage-remove generic-function) - (storage-element generic-function) + (alert generic-function) + (log-console generic-function) + (log-error generic-function) + (print-window generic-function) + (scroll-by generic-function) + (scroll-to generic-function) + (open-window generic-function) + (close-window generic-function) + (close-connection generic-function) + (request-animation-frame generic-function) "CLOG-Window - Events" (set-on-abort generic-function) @@ -963,11 +959,21 @@ embedded in a native template application.)" (set-on-before-unload generic-function) (set-on-hash-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-to 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") "CLOG-Document - CLOG Document Objects"