aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugin/plugin.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2026-05-20 08:10:47 +0200
committerdec05eba <dec05eba@protonmail.com>2026-05-20 08:10:47 +0200
commit280131585e07b6d5c8438af258b7de0afeff8266 (patch)
tree6c00853ef23141c0f3a7517e491a7f44502b20b5 /plugin/plugin.h
parentf9d6045b28c5ba71831896c1acc2db13f83c6825 (diff)
plugin: add is_damaged and clear_damage
Diffstat (limited to 'plugin/plugin.h')
-rw-r--r--plugin/plugin.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/plugin.h b/plugin/plugin.h
index 902d1d7..769a629 100644
--- a/plugin/plugin.h
+++ b/plugin/plugin.h
@@ -43,6 +43,12 @@ typedef struct {
/* Optional, called when the plugin is expected to draw something to the current framebuffer */
void (*draw)(const gsr_plugin_draw_params *params, void *userdata);
+ /* Optional, returns false if this function is NULL. If this function is defined then this should return true
+ if there is an update visually that the plugin wants to display. This is useful when used with the "content" framerate mode
+ which only captures a frame when the frame has changed */
+ bool (*is_damaged)(void *userdata);
+ /* Optional */
+ void (*clear_damage)(void *userdata);
} gsr_plugin_init_return;
/* The plugin is expected to implement these functions and export them: */