This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun call-user-function () | |
(get-minibuffer-input "what's your age?" some-user-function)) | |
(defun some-user-function (input-1) | |
) | |
(defun get-minibuffer-input (prompt function) | |
(register-user-function function) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *some-global* ()) | |
(defun my-command () | |
(with-results ((name (read-from-minibuffer :prompt "What is your name?")) | |
(age (read-from-minibuffer :prompt "What is your age?"))) | |
(print name) | |
(print age) | |
(setf *some-global* name)) | |
(print *some-global*)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun copy () | |
(#/sendAction:to:from: ccl::*nsapp* (objc:@selector #/copy:) nil *next-view*)) | |
(defun paste () | |
(#/sendAction:to:from: ccl::*nsapp* (objc:@selector #/paste:) nil *next-view*)) | |
(defun cut () | |
(#/sendAction:to:from: ccl::*nsapp* (objc:@selector #/cut:) nil *next-view*)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :next) | |
(setf *start-page-url* "about:blank") | |
(defvar *shell-mode-map* (make-hash-table :test 'equalp)) | |
(defclass shell-mode (mode) ()) | |
(defun shell-mode () | |
(make-instance 'application-mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- | |
;;;; next.asd | |
(defsystem :next | |
:serial t | |
:depends-on (:cl-strings :cl-string-match :puri :queues.simple-queue | |
:sqlite :parenscript :cl-json :swank | |
(:require "cocoa") (:require "webkit")) | |
:pathname "source/" | |
:components ((:file "package") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmethod print-object ((buffer buffer) stream) | |
(format stream "~s" (name buffer))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The value | |
#<FUNCTION (LAMBDA () :IN INTERFACE:WEB-VIEW-EXECUTE) | |
{1008EE579B}> | |
is not of type | |
SYSTEM-AREA-POINTER. | |
[Condition of type TYPE-ERROR] | |
Restarts: | |
0: [RETURN-FROM-G-CLOSURE] Return value from closure | |
1: [ABORT] abort thread (#<THREAD "cl-cffi-gtk main thread" RUNNING {1003FF4C53}>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; callback.lisp --- C-side callbacks | |
;; This file is part of cl-webkit. | |
;; | |
;; cl-webkit is free software; you can redistribute it and/or modify | |
;; it under the terms of the MIT license. | |
;; See `COPYING' in the source distribution for details. | |
;;; Code: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cffi:defcallback callybacky :void () | |
(print "called!")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Code | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(cffi:defcallback callybacky :void () | |
(print "called!")) | |
(defun web-view-execute (view script) | |
(let ((np (cffi:null-pointer))) | |
(webkit2:webkit-web-view-run-javascript view script np callybacky np))) |