void hsobject_complete_attributes(HSObject* obj, bool user_only, char* needle, char* prefix, GString* output) { for (int i = 0; i < obj->attribute_count; i++) { HSAttribute* attr = obj->attributes + i; if (user_only && !attr->user_attribute) { // do not complete default attributes if user_only is set continue; } try_complete_prefix(needle, attr->name, prefix, output); } }
void complete_against_mouse_buttons(const char* needle, char* prefix, GString* output) { for (int i = 0; i < LENGTH(string2button_table); i++) { const char* buttonname = string2button_table[i].name; try_complete_prefix(needle, buttonname, prefix, output); } }