From: Javier Sancho Date: Fri, 4 Oct 2019 15:05:41 +0000 (+0200) Subject: set-window-caption! X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=2bfad8c43ad04ba9e670b7274a2661b27c02d6a2;p=guile-irrlicht.git set-window-caption! --- diff --git a/examples/hello.scm b/examples/hello.scm index 4f9026e..c8643b5 100644 --- a/examples/hello.scm +++ b/examples/hello.scm @@ -23,3 +23,5 @@ (define device (create-device 'opengl)) (define driver (get-video-driver device)) (define scene-manager (get-scene-manager device)) + +(set-window-caption! device "Hello World!") diff --git a/irrlicht.scm b/irrlicht.scm index 7cbb886..6e7ccff 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -26,7 +26,8 @@ #:use-module ((irrlicht bindings video) #:prefix ffi-video:) #:export (create-device get-video-driver - get-scene-manager)) + get-scene-manager + set-window-caption!)) (define* (create-device #:optional (device-type 'software) @@ -54,3 +55,6 @@ (define (get-scene-manager device) (ffi:get-scene-manager device)) + +(define (set-window-caption! device text) + (ffi:set-window-caption device (string->pointer text))) diff --git a/irrlicht/bindings.scm b/irrlicht/bindings.scm index eab8e33..148a785 100644 --- a/irrlicht/bindings.scm +++ b/irrlicht/bindings.scm @@ -40,3 +40,9 @@ '* (dynamic-func "irr_IrrlichtDevice_getSceneManager" cirr) (list '*))) + +(define-public set-window-caption + (pointer->procedure + void + (dynamic-func "irr_IrrlichtDevice_setWindowCaption" cirr) + (list '* '*)))