This code places a single Elementary list widgets on a window, just to exemplify the more simple and common use case: a list will be created and populated with a few items.
To keep it simple, we won't show how to customize the list, for this check List widget example. Also, we won't focus on items management on this example. For an example about this subject, check List - Items management.
To add a list widget.
We are just adding the list, so as you can see, defaults for it are:
To add items, we are just appending it on a loop, using function elm_list_item_append(), that will be better explained on items management example.
After we just want to show the list. But first we need to start the widget. It was done this way to improve widget's performance. So, always remember that:
See the full list_example_01.c code, whose window should look like this picture: