1 #ifndef _SWAYLOCK_FADE_H 2 #define _SWAYLOCK_FADE_H 3 4 #include <stdbool.h> 5 #include <stdint.h> 6 7 struct pool_buffer; 8 9 struct swaylock_fade { 10 float current_time; 11 float target_time; 12 uint32_t old_time; 13 uint32_t *original_buffer; 14 }; 15 16 void fade_prepare(struct swaylock_fade *fade, struct pool_buffer *buffer); 17 void fade_update(struct swaylock_fade *fade, struct pool_buffer *buffer, uint32_t time); 18 bool fade_is_complete(struct swaylock_fade *fade); 19 void fade_destroy(struct swaylock_fade *fade); 20 21 #endif 22