From 370f433110c7341ecbc319537493c72375662fb5 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Sat, 4 May 2024 11:09:33 +0200 Subject: [PATCH] Document how strings are handled in the cut/copy/paste callbacks --- Sources/kinc/system.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/kinc/system.h b/Sources/kinc/system.h index e4037c145..4a10f5652 100644 --- a/Sources/kinc/system.h +++ b/Sources/kinc/system.h @@ -252,6 +252,7 @@ KINC_FUNC void kinc_set_drop_files_callback(void (*callback)(wchar_t *, void *), /// /// Sets a callback which is called when the application is instructed to cut, typically via ctrl+x or cmd+x. +/// Kinc does not take ownership of the provided string. /// /// The cut-callback /// Arbitrary data-pointer that's passed to the callback @@ -259,6 +260,7 @@ KINC_FUNC void kinc_set_cut_callback(char *(*callback)(void *), void *data); /// /// Sets a callback which is called when the application is instructed to copy, typically via ctrl+c or cmd+c. +/// Kinc does not take ownership of the provided string. /// /// The copy-callback /// Arbitrary data-pointer that's passed to the callback @@ -266,6 +268,7 @@ KINC_FUNC void kinc_set_copy_callback(char *(*callback)(void *), void *data); /// /// Sets a callback which is called when the application is instructed to paste, typically via ctrl+v or cmd+v. +/// The provided string is only valid during the callback-call - copy it if you want to keep it. /// /// The paste-callback /// Arbitrary data-pointer that's passed to the callback