/*$Id:$*/
/*23.12.2025	23.12.2025	Белых А.И.	iceb_set_blinking_text.cpp
Включение мерцания текста
*/
#include "iceb_libbuh.h"

const char* style = 
/********/
    "@keyframes blink {"
    "  0% { opacity: 1.0; }"
    "  50% { opacity: 0.0; }"
    "  100% { opacity: 1.0; }"
    "}"
/***********/
/************
    "@keyframes blink {"
    "from { opacity: 1; }"
    "to { opacity: 0; }"
     "}"
***************/
    ".blinking-text {"
    "  animation: blink 1s infinite;"
    "}";

void iceb_set_blinking_text(GtkWidget *label)
{
// Добавляем класс для метки
GtkStyleContext *context = gtk_widget_get_style_context(label);
gtk_style_context_add_class(context, "blinking-text");

// Загружаем CSS
GtkCssProvider *provider = gtk_css_provider_new();
gtk_css_provider_load_from_data(provider, style, -1, NULL);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_USER);
}
