Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

unsigned sp_attribute_lookup ( gchar const *  key )

Returns an SPAttributeEnum; SP_ATTR_INVALID (of value 0) if key isn't recognized.

Definition at line 489 of file attributes.cpp.

Referenced by sp_object_read_attr(), and sp_style_merge_style_from_decl().

    static GHashTable *propdict = NULL;

    if (!propdict) {
        unsigned int i;
        propdict = g_hash_table_new(g_str_hash, g_str_equal);
        for (i = 1; i < n_attrs; i++) {
            g_assert(props[i].code == static_cast< gint >(i) );
                                const_cast<void *>(static_cast<void const *>(props[i].name)),

    return GPOINTER_TO_UINT(g_hash_table_lookup(propdict, key));

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index