View Single Post
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#7
I keep talking about this and I keep hitting brick walls when I start working on it.

Stuff like this doesn't need overlays, it needs hooks.
And hooks need a hooking platform.

iOS has MobileSubstrate, a platform that loads hooks which replace code at run time ("tweaks" in English), a similar concept could be done on Maemo 5, although a bit harder since Obj-C uses plain text for method and class names.

The Maemo 5 way would be:
  • Patch hildon-desktop's exec code, so it looks for binaries in a specific folder (like /opt/usr/lib/hooks).
  • When an app is started, in this case, rtcom-call-ui, hildon-desktop would look for hooks in /opt/usr/lib/hooks/hildon-desktop/*.so, and if found, load them.
  • These hooks would replace different methods of the code, this needs to be done carefully in order to not use a lot of memory.
  • Again, in this case, GTK libs need to be patched so the button can be destroyed and replaced by a slider for example, then the libs need to be loaded, OR the methods of the phone app, including the init() method of the incoming call dialog so that it's rewritten, and the new UI would call the existing methods by calling the methods internally.
 

The Following 6 Users Say Thank You to MohammadAG For This Useful Post: