Lines Matching refs:emblem
42 * having an emblem, which is an icon with additional properties.
45 * Currently, only metainformation about the emblem's origin is
80 GEmblem *emblem = G_EMBLEM (object);
85 g_value_set_object (value, emblem->icon);
88 g_value_set_enum (value, emblem->origin);
103 GEmblem *emblem = G_EMBLEM (object);
108 emblem->icon = g_value_get_object (value);
112 emblem->origin = g_value_get_enum (value);
124 GEmblem *emblem = G_EMBLEM (object);
126 g_object_unref (emblem->icon);
144 P_("Tells which origin the emblem is derived from"),
152 P_("The icon of the emblem"),
153 P_("The actual icon of the emblem"),
160 g_emblem_init (GEmblem *emblem)
168 * Creates a new emblem for @icon.
177 GEmblem* emblem;
183 emblem = g_object_new (G_TYPE_EMBLEM, NULL);
184 emblem->icon = g_object_ref (icon);
185 emblem->origin = G_EMBLEM_ORIGIN_UNKNOWN;
187 return emblem;
193 * @origin: a GEmblemOrigin enum defining the emblem's origin
195 * Creates a new emblem for @icon.
205 GEmblem* emblem;
211 emblem = g_object_new (G_TYPE_EMBLEM, NULL);
212 emblem->icon = g_object_ref (icon);
213 emblem->origin = origin;
215 return emblem;
220 * @emblem: a #GEmblem from which the icon should be extracted.
222 * Gives back the icon from @emblem.
224 * Returns: a #GIcon. The returned object belongs to the emblem
230 g_emblem_get_icon (GEmblem *emblem)
232 g_return_val_if_fail (G_IS_EMBLEM (emblem), NULL);
234 return emblem->icon;
240 * @emblem: a #GEmblem
242 * Gets the origin of the emblem.
244 * Returns: the origin of the emblem
249 g_emblem_get_origin (GEmblem *emblem)
251 g_return_val_if_fail (G_IS_EMBLEM (emblem), G_EMBLEM_ORIGIN_UNKNOWN);
253 return emblem->origin;
259 GEmblem *emblem = G_EMBLEM (icon);
262 hash = g_icon_hash (g_emblem_get_icon (emblem));
263 hash ^= emblem->origin;
284 GEmblem *emblem = G_EMBLEM (icon);
296 s = g_icon_to_string (emblem->icon);
302 s = g_strdup_printf ("%d", emblem->origin);
314 GEmblem *emblem;
318 emblem = NULL;
347 emblem = g_emblem_new_with_origin (icon, origin);
350 return G_ICON (emblem);