Implement lookup for GListModel
Submitted by Carlos Soriano
Link to original bug (#777445)
Description
When using GListModel usually you don't know the positions of the items, since you provide the sorting function already, knowing the items position would require to have a separated data structure and update it accordingly alongside the model.
One particular case of this situation is in GtkFlowBox, where we use an internal GSequence even when binding to a GListModel, instead of using the GListModel to get the index of the objects, etc.
My proposal is to expose the lookup through GListModel to be able to lookup items without iterating or needing a separate data structure. In case of GListStore it would only require to wrap g_sequence_lookup.
In case there is agreement I'm willing to implement the patch.