1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

merge upstream

This commit is contained in:
Joakim Verona 2011-08-01 16:40:12 +02:00
commit 022cd22bf1
4 changed files with 440 additions and 316 deletions

View file

@ -19,31 +19,36 @@ see xwidget.c for types suitable for TYPE.
(defun xwidget-at (pos)
(let* ((xw (car (cdr (cdr (get-text-property pos 'display))))))
(if ( xwidgetp car) xw nil))
;;this function is a bit tedious because the C layer isnt well protected yet and
;;xwidgetp aparently doesnt work yet
(let* ((disp (get-text-property pos 'display))
(xw (car (cdr (cdr disp)))))
;;(if ( xwidgetp xw) xw nil)
(if (equal 'xwidget (car disp)) xw)
))
(defun xwidget-socket-handler ()
"creates plug for socket. TODO"
(interactive)
(message "socket handler xwidget %S" last-input-event)
(let*
((xwidget-event-type (nth 2 last-input-event))
(xwidget-id (nth 1 last-input-event)))
(cond ( (eq xwidget-event-type 'xembed-ready)
(let*
((xembed-id (nth 3 last-input-event)))
(message "xembed ready event: %S xw-id:%s" xembed-id xwidget-id)
;;TODO fetch process data from the xwidget. create it, store process info
;;will start emacs/uzbl in a xembed socket when its ready
;; (cond
;; ((eq 3 xwidget-id)
;; (start-process "xembed" "*xembed*" (format "%ssrc/emacs" default-directory) "-q" "--parent-id" (number-to-string xembed-id) ) )
;; ((eq 5 xwidget-id)
;; (start-process "xembed2" "*xembed2*" "uzbl-core" "-s" (number-to-string xembed-id) "http://www.fsf.org" ) )
))))))
(defun xwidget-socket-handler ()
"creates plug for socket. TODO"
(interactive)
(message "socket handler xwidget %S" last-input-event)
(let*
((xwidget-event-type (nth 2 last-input-event))
(xwidget-id (nth 1 last-input-event)))
(cond ( (eq xwidget-event-type 'xembed-ready)
(let*
((xembed-id (nth 3 last-input-event)))
(message "xembed ready event: %S xw-id:%s" xembed-id xwidget-id)
;;TODO fetch process data from the xwidget. create it, store process info
;;will start emacs/uzbl in a xembed socket when its ready
;; (cond
;; ((eq 3 xwidget-id)
;; (start-process "xembed" "*xembed*" (format "%ssrc/emacs" default-directory) "-q" "--parent-id" (number-to-string xembed-id) ) )
;; ((eq 5 xwidget-id)
;; (start-process "xembed2" "*xembed2*" "uzbl-core" "-s" (number-to-string xembed-id) "http://www.fsf.org" ) )
)))))