diff options
author | rcombs <rcombs@rcombs.me> | 2022-12-16 15:21:35 -0600 |
---|---|---|
committer | rcombs <rcombs@rcombs.me> | 2023-01-28 14:20:20 -0600 |
commit | 2cfaa820e54b12de437bb4da97d894ad610abcdd (patch) | |
tree | 7a99f10325278da9f9e95b5c356e088511d0eed1 /libmpv/client.h | |
parent | 04241ab731432f9d13c3cfa160c39f98f1d36ba2 (diff) | |
download | mpv-2cfaa820e54b12de437bb4da97d894ad610abcdd.tar.bz2 mpv-2cfaa820e54b12de437bb4da97d894ad610abcdd.tar.xz |
libmpv: add mpv_del_property() convenience function
Diffstat (limited to 'libmpv/client.h')
-rw-r--r-- | libmpv/client.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libmpv/client.h b/libmpv/client.h index fb10e5e01d..414c6fe80e 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -240,7 +240,7 @@ extern "C" { * relational operators (<, >, <=, >=). */ #define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL) -#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 0) +#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 1) /** * The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before @@ -1069,6 +1069,16 @@ MPV_EXPORT int mpv_set_property(mpv_handle *ctx, const char *name, mpv_format fo MPV_EXPORT int mpv_set_property_string(mpv_handle *ctx, const char *name, const char *data); /** + * Convenience function to delete a property. + * + * This is equivalent to running the command "del [name]". + * + * @param name The property name. See input.rst for a list of properties. + * @return error code + */ +MPV_EXPORT int mpv_del_property(mpv_handle *ctx, const char *name); + +/** * Set a property asynchronously. You will receive the result of the operation * as MPV_EVENT_SET_PROPERTY_REPLY event. The mpv_event.error field will contain * the result status of the operation. Otherwise, this function is similar to |