[retro-gtk/wip/aplazas/css] Add CSS names to the widgets



commit 14923803d4f488979bb5a640c439d4d10dc82b72
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Sep 11 15:43:59 2018 +0200

    Add CSS names to the widgets

 retro-gtk/retro-cairo-display.c | 3 +++
 retro-gtk/retro-core-view.c     | 3 +++
 retro-gtk/retro-gl-display.c    | 3 +++
 3 files changed, 9 insertions(+)
---
diff --git a/retro-gtk/retro-cairo-display.c b/retro-gtk/retro-cairo-display.c
index 630c95e..379f52a 100644
--- a/retro-gtk/retro-cairo-display.c
+++ b/retro-gtk/retro-cairo-display.c
@@ -196,6 +196,7 @@ static void
 retro_cairo_display_class_init (RetroCairoDisplayClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   ((GtkWidgetClass *) klass)->draw = (gboolean (*) (GtkWidget *, cairo_t *)) retro_cairo_display_real_draw;
 
@@ -213,6 +214,8 @@ retro_cairo_display_class_init (RetroCairoDisplayClass *klass)
                          G_PARAM_STATIC_NICK |
                          G_PARAM_STATIC_BLURB);
   g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PIXBUF, properties[PROP_PIXBUF]);
+
+  gtk_widget_class_set_css_name (widget_class, "retrocairodisplay");
 }
 
 static void
diff --git a/retro-gtk/retro-core-view.c b/retro-gtk/retro-core-view.c
index 8d729ba..5772045 100644
--- a/retro-gtk/retro-core-view.c
+++ b/retro-gtk/retro-core-view.c
@@ -408,6 +408,7 @@ static void
 retro_core_view_class_init (RetroCoreViewClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   object_class->finalize = retro_core_view_finalize;
   object_class->get_property = retro_core_view_get_property;
@@ -436,6 +437,8 @@ retro_core_view_class_init (RetroCoreViewClass *klass)
   g_object_class_install_properties (object_class,
                                      N_PROPS,
                                      properties);
+
+  gtk_widget_class_set_css_name (widget_class, "retrocoreview");
 }
 
 RetroCoreView* retro_core_view_construct (GType object_type) {
diff --git a/retro-gtk/retro-gl-display.c b/retro-gtk/retro-gl-display.c
index ff1fc8c..d511f61 100644
--- a/retro-gtk/retro-gl-display.c
+++ b/retro-gtk/retro-gl-display.c
@@ -374,8 +374,11 @@ static void
 retro_gl_display_class_init (RetroGLDisplayClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   object_class->finalize = retro_gl_display_finalize;
+
+  gtk_widget_class_set_css_name (widget_class, "retrogldisplay");
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]