Changes between Initial Version and Version 1 of HackingGtk

Nov 23, 2007 4:11:09 PM (14 years ago)

Add GTK+ hacking information verbatim


  • HackingGtk

    v1 v1  
     3= Hacker's guide to WebKit/GTK+ =
     5== Code layout ==
     7The GTK+ port targets the cross-platform GLib and GTK+ APIs. This means that it can be built against any of the windowing systems supported by GTK+ and Cairo without modification -- those tested so far are X11 and DirectFB. Windows should work too, possibly needing a couple of tweaks.
     9This means that developers adding code specific to a certain windowing system should make sure their changes are conditionally compiled only when that windowing system is available. This might be done at configure time or with a switch passed to the build system, or even just using the definitions provided by the gdk headers.
     11The main components of the port:
     13=== Gtk+-specific modules ===
     15 * Gtk+/Gtk UI platform: [ WebCore/platform/gtk]
     17 * "Page/Gtk": [ WebCore/page/gtk]
     19 * "Loader/Gtk": [ WebCore/loader/gtk]
     21 * Public API: [ WebKit/gtk]
     23 * GtkLauncher (example application): [ WebKitTools/GtkLauncher]
     25There may be other gtk-port related directories which have yet to be listed here.
     27=== Shared code modules ===
     29While the Gtk+ port is the primary consumer of these backends, we aim to keep them portable, avoiding even ifdef'd sections specific to the Gtk+ port:
     31 * curl http backend: [ WebCore/platform/network/curl]
     33 * cairo graphics backend: [ WebCore/platform/graphics/cairo]
     35 * cairo graphics SVG backend: [ WebCore/platform/graphics/svg/cairo]
     37== Current tasks (July '07) ==
     39 * Make things work with debugging enabled (when NDEBUG is removed, assertions are triggered right now)
     40 * Fix animated GIF images -- consider using GdkPixbuf?
     41 * Continue to fix the curl backend
     42 * Start to consider consolidating the widget into a single place as the Qt port has done, and look into implementing eg. createFrame()
     43 * Look into supporting the canvas
     44 * Attempt to merge the Cairo code in the Win32 port -- the equivalent code is copy-and-pasted into the "Gdk" port in some places. This will help reduce code duplication but also help towards getting WebKit/Gdk/Gtk+ working on Windows
     47== Issues known ==
     49=== CURL ===
     50 * Review and possibly integrate the [ sand-labs CURL backend] code. It has a slightly different API, so needs to be back-ported, but looks like it may be more feature-complete, able to handle redirects properly etc.
     51 * The non zero select timeout feels bad. Make it possible to write a GSourceFunc to not poll the sockets and have a timeout: This can probably be done by integrating code from MIT/X11 licensed [ glibcurl].
     52 * Cookie handling is completely lacking as pointed out on the mailing list
     53 * Errors of curl need to be properly populated
     55=== Gtk ===
     56 * A lot of classes are not yet implemented
     57 * For painting we have some issues in regard to Expose Events and when WebKit will call paint.
     59=== Theming ===
     60 * Consider taking code directly from Mozilla's LGPL licensed Gtk+ theming backend. They deal with a lot of corner cases which don't look fun to re-implement.
     61 * Focus ring drawing
     62 * Scrollbars for PlatformScrollbar will be terrible as we need to implement a HitTest but don't know where the elements of the scrollbar hide
     63 * Native theming for text entries
     64 * Find a way to draw a GtkComboBox, at least the button part.  This is needed to implement theming of the <select> element properly.