From 2bfad8c43ad04ba9e670b7274a2661b27c02d6a2 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Fri, 4 Oct 2019 17:05:41 +0200 Subject: [PATCH] set-window-caption! --- examples/hello.scm | 2 ++ irrlicht.scm | 6 +++++- irrlicht/bindings.scm | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) 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 '* '*))) -- 2.39.5