Gio.AppInfo in the Gtk library stack is a good point to start.
If you are looking for the approach that is used by the gnome-system-monitor then the prettytable.c file will the one you need to check.
There is one more approach, scanning the /usr/share/application/ directory and creating a file monitor for this directory. All icons of the application are that are in the menu can be found here.
I have been working on a project which involves me to get the icon from the icon theme used on Linux so that I can use it with the Gtk Pixbuf like how Gnome-system-monitor displays the icon for all the process, the same thing I want to achieve. Any ideas about how to do this?
I am using python with Gtk on PopOS 20.10.
Get icon of a process (like in gnome-system-monitor) to be used with Gtk and python