| 49 |
49 |
| 50 GType gtk_ticker_get_type (void) |
50 GType gtk_ticker_get_type (void) |
| 51 { |
51 { |
| 52 static GType ticker_type = 0; |
52 static GType ticker_type = 0; |
| 53 |
53 |
| |
54 ticker_type = g_type_from_name("GtkTicker"); |
| |
55 |
| 54 if (!ticker_type) |
56 if (!ticker_type) |
| 55 { |
57 { |
| 56 static const GTypeInfo ticker_info = |
58 static const GTypeInfo ticker_info = |
| 57 { |
59 { |
| 58 sizeof(GtkTickerClass), |
60 sizeof(GtkTickerClass), |
| 66 (GInstanceInitFunc) gtk_ticker_init |
68 (GInstanceInitFunc) gtk_ticker_init |
| 67 }; |
69 }; |
| 68 |
70 |
| 69 ticker_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkTicker", |
71 ticker_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkTicker", |
| 70 &ticker_info, 0); |
72 &ticker_info, 0); |
| |
73 } |
| |
74 |
| |
75 /* kludge to re-initialise the class if it's already registered */ |
| |
76 else if (parent_class == NULL) { |
| |
77 gtk_ticker_class_init((GtkTickerClass *)g_type_class_peek(ticker_type)); |
| 71 } |
78 } |
| 72 |
79 |
| 73 return ticker_type; |
80 return ticker_type; |
| 74 } |
81 } |
| 75 |
82 |