diff --git a/source/clog-base.lisp b/source/clog-base.lisp index 933eaef..3055388 100644 --- a/source/clog-base.lisp +++ b/source/clog-base.lisp @@ -81,7 +81,7 @@ during attachment. (Private)")) (:documentation "Execure SCRIPT on browser. (Internal)")) (defmethod js-execute ((obj clog-obj) script) - (cc:execute (connection-id obj) script)) + (clog-connection:execute (connection-id obj) script)) ;;;;;;;;;;;;;; ;; js-query ;; @@ -91,7 +91,7 @@ during attachment. (Private)")) (:documentation "Execure SCRIPT on browser and return result. (Internal)")) (defmethod js-query ((obj clog-obj) script &key (default-answer nil)) - (cc:query (connection-id obj) script :default-answer default-answer)) + (clog-connection:query (connection-id obj) script :default-answer default-answer)) ;;;;;;;;;;;; ;; jquery ;; @@ -414,7 +414,7 @@ result or if time out DEFAULT-ANSWER (Private)")) (:documentation "Returns true if connection is valid on this CLOG-OBJ.")) (defmethod validp ((obj clog-obj)) - (cc:validp (connection-id obj))) + (clog-connection:validp (connection-id obj))) ;;;;;;;;;;;;;;;;;;;;; ;; connection-data ;; @@ -429,7 +429,7 @@ for internal use of clog. The key \"clog-body\" is set to the clog-body of this connection.")) (defmethod connection-data ((obj clog-obj)) - (cc:get-connection-data (connection-id obj))) + (clog-connection:get-connection-data (connection-id obj))) ;;;;;;;;;;;;;;;;;;;;;;;;;; ;; connection-data-item ;; diff --git a/source/clog-canvas.lisp b/source/clog-canvas.lisp index 228e3e2..3cfe56e 100644 --- a/source/clog-canvas.lisp +++ b/source/clog-canvas.lisp @@ -44,8 +44,8 @@ (defmethod create-context2d ((obj clog-canvas)) - (let ((web-id (cc:generate-id))) - (cc:execute (connection-id obj) + (let ((web-id (clog-connection:generate-id))) + (clog-connection:execute (connection-id obj) (format nil "clog['~A']=clog['~A'].getContext('2d')" web-id (html-id obj))) diff --git a/source/clog-document.lisp b/source/clog-document.lisp index 95ca2ac..cac3752 100644 --- a/source/clog-document.lisp +++ b/source/clog-document.lisp @@ -122,7 +122,8 @@ clog-document object. (Private)")) (defgeneric set-title (clog-document value)) (defmethod set-title ((obj clog-document) value) - (execute obj (format nil "title='~A'" (cc:escape-string value)))) + (execute obj + (format nil "title='~A'" (clog-connection:escape-string value)))) (defsetf title set-title) ;;;;;;;;;;;;;;;;;; diff --git a/source/clog-element.lisp b/source/clog-element.lisp index 88e9c20..1cff8d4 100644 --- a/source/clog-element.lisp +++ b/source/clog-element.lisp @@ -40,8 +40,8 @@ clog[] but is not in the DOM. If HTML-ID is nil one is generated. (private)" (let ((web-id (if html-id html-id - (cc:generate-id)))) - (cc:execute + (clog-connection:generate-id)))) + (clog-connection:execute connection-id (format nil "clog['~A']=$(\"~A\").get(0); $(clog['~A']).first().prop('id','~A')" @@ -55,7 +55,7 @@ clog[] but is not in the DOM. If HTML-ID is nil one is generated. (defun attach (connection-id html-id) "Create a new clog-obj and attach an existing element with HTML-ID on CONNECTION-ID to it and then return it. The HTML-ID must be unique. (private)" - (cc:execute connection-id + (clog-connection:execute connection-id (format nil "clog['~A']=$('#~A').get(0)" html-id html-id)) (make-clog-element connection-id html-id)) @@ -93,7 +93,7 @@ must be in DOM, ie placed or auto-placed.")) (defmethod attach-as-child ((obj clog-obj) html-id &key (clog-type 'clog-element)) - (cc:execute (connection-id obj) + (clog-connection:execute (connection-id obj) (format nil "clog['~A']=$('#~A').get(0)" html-id html-id)) (make-clog-element (connection-id obj) html-id :clog-type clog-type)) diff --git a/source/clog-form.lisp b/source/clog-form.lisp index 58e787f..dc75727 100644 --- a/source/clog-form.lisp +++ b/source/clog-form.lisp @@ -17,14 +17,14 @@ (defmethod form-get-data (clog-obj) (quri:uri-query-params - (quri:uri (cc:query (connection-id clog-obj) "location.href")))) + (quri:uri (clog-connection:query (connection-id clog-obj) "location.href")))) (defgeneric form-post-data (clog-obj) (:documentation "Get the form data as an a-list sent by post method")) (defmethod form-post-data (clog-obj) (quri:url-decode-params - (cc:query (connection-id clog-obj) "clog['post-data']"))) + (clog-connection:query (connection-id clog-obj) "clog['post-data']"))) (defun form-data-item (form-data item) "Return value for ITEM from FROM-DATA a-list" @@ -379,7 +379,7 @@ have this set true. Autofocus on element when form loaded. ")) group called NAME.")) (defmethod radio-value ((obj clog-obj) name) - (cc:query (connection-id obj) + (clog-connection:query (connection-id obj) (format nil "$('input:radio[name=~A]:checked').val()" name))) @@ -391,7 +391,7 @@ group called NAME.")) (:documentation "Returns t or nil on the selected checkbox button.")) (defmethod checkbox-value ((obj clog-obj) name) - (js-on-p (cc:query (connection-id obj) + (js-on-p (clog-connection:query (connection-id obj) (format nil "$('input:checkbox[name=~A]:checked').val()" name)))) @@ -404,7 +404,7 @@ group called NAME.")) be unique name on entire document.")) (defmethod select-value ((obj clog-obj) name) - (cc:query (connection-id obj) + (clog-connection:query (connection-id obj) (format nil "$('select[name=~A] option:selected').val()" name))) ;;;;;;;;;;;;;;;; @@ -416,7 +416,7 @@ be unique name on entire document.")) be unique name on entire document.")) (defmethod name-value ((obj clog-obj) name) - (cc:query (connection-id obj) + (clog-connection:query (connection-id obj) (format nil "$('input[name=~A]').val()" name))) ;;;;;;;;;;;;; diff --git a/source/clog-helpers.lisp b/source/clog-helpers.lisp index 795818f..3c97574 100644 --- a/source/clog-helpers.lisp +++ b/source/clog-helpers.lisp @@ -87,7 +87,7 @@ clog-user:*body* to last window openned to /repl." (unless *clog-running* (initialize nil :boot-file "/debug.html")) (set-on-new-window (lambda (body) - (cc:debug-mode (connection-id body)) + (clog-connection:debug-mode (connection-id body)) (setf clog-user::*body* body)) :path "/repl") (open-browser :url "http://127.0.0.1:8080/repl") diff --git a/source/clog-system.lisp b/source/clog-system.lisp index f3e0076..d427829 100644 --- a/source/clog-system.lisp +++ b/source/clog-system.lisp @@ -28,7 +28,7 @@ the same as the clog directy this overides the relative paths used in them.") ;;;;;;;;;;;;;;;; (defun on-connect (connection-id) - (when cc:*verbose-output* + (when clog-connection:*verbose-output* (format t "Start new window handler on connection-id - ~A" connection-id)) (let ((body (make-clog-body connection-id))) (let* ((path (path-name (location body))) @@ -63,14 +63,14 @@ compiled version." (set-on-new-window on-new-window-handler :path "/" :boot-file boot-file) (unless *clog-running* (setf *clog-running* t) - (cc:initialize #'on-connect - :host host - :port port - :boot-file boot-file - :static-boot-js static-boot-js - :static-root (if *overide-static-root* - *overide-static-root* - static-root)))) + (clog-connection:initialize #'on-connect + :host host + :port port + :boot-file boot-file + :static-boot-js static-boot-js + :static-root (if *overide-static-root* + *overide-static-root* + static-root)))) ;;;;;;;;;;;;;;;;;;;;;;; ;; set-on-new-window ;; @@ -83,7 +83,7 @@ using BOOT_FILE. Paths should always begin with a '/'. If PATH is set to \"default\" will use boot-file when the route can not be determined, ie a static html file including boot.js that has not been added with this function. If BOOT-FILE is nil path is removed." - (cc:set-clog-path path boot-file) + (clog-connection:set-clog-path path boot-file) (if boot-file (setf (gethash path *url-to-on-new-window*) on-new-window-handler) (remhash path *url-to-on-new-window*))) @@ -96,7 +96,7 @@ function. If BOOT-FILE is nil path is removed." "Shutdown CLOG." (clrhash *url-to-on-new-window*) (setf *clog-running* nil) - (cc:shutdown-clog)) + (clog-connection:shutdown-clog)) ;;;;;;;;;;;;;;;; ;; debug-mode ;; @@ -104,7 +104,7 @@ function. If BOOT-FILE is nil path is removed." (defun debug-mode (obj) "Turn on browser console debugging for OBJ's connection." - (cc:debug-mode (connection-id obj))) + (clog-connection:debug-mode (connection-id obj))) ;;;;;;;;;;;;;;;;;; ;; open-browser ;; diff --git a/source/clog-window.lisp b/source/clog-window.lisp index bf2e346..7b6001a 100644 --- a/source/clog-window.lisp +++ b/source/clog-window.lisp @@ -401,7 +401,7 @@ very limitted to just open a new tab with url unless is a localhost url.")) (:documentation "Close connection to browser with out closing browser.")) (defmethod close-connection ((obj clog-window)) - (cc:cclose (connection-id obj))) + (clog-connection:cclose (connection-id obj))) ;;;;;;;;;;;;;;;;;; ;; set-on-abort ;; diff --git a/source/clog.lisp b/source/clog.lisp index 5b95009..a411728 100644 --- a/source/clog.lisp +++ b/source/clog.lisp @@ -16,7 +16,6 @@ (mgl-pax:define-package :clog (:documentation "The Common List Omnificent GUI - CLOG") - (:local-nicknames (:cc :clog-connection)) (:use #:cl #:parse-float #:mgl-pax)) (cl:in-package :clog)