C API and Introspection

I spent some time cleaning up the Rust C extension and the FFI layer to make it easier to consume from C and through GObject Introspection. One of the biggest changes was exposing the PitiviTimelineRuler instance type in the public headers instead of treating it as a generic GtkWidget. That gives GIR enough information to generate proper bindings automatically.

I also fixed an issue that only showed up in headless CI environments. The widget was previously relying on gtk::init() during type registration, which doesn't work well without a display server. Switching to set_initialized() solved the problem and made the test suite much more reliable.

Rendering Improvements

The rendering code also received a fairly large cleanup. Previously, the widget stored several pieces of drawing state separately, including adjustments, cached Pango layouts, and font descriptions. These have now been grouped into a single DrawingState struct protected by one RefCell.

Besides making the code easier to reason about, this reduces unnecessary borrow checks during rendering and avoids situations where only part of the drawing state could be updated while signals were being emitted.

I also introduced a labels_dirty flag so timeline labels are only recalculated when they're actually needed during the snapshot phase. That removes quite a bit of redundant layout work while scrolling and zooming.

Timeline Marker API

The custom layout manager is nearly finished, and with it comes a much simpler way to place widgets on the timeline.

I am currently wrapping up an add_marker() API that will allow attaching any GTK widget to the ruler at a specific timestamp. The PitiviTimelineLayoutChild now exposes the widget's timestamp as a GObject property.

I'm looking forward to getting this merged, as it should make timeline overlays and markers much easier to implement.

Stability Fixes

I also addressed a few smaller edge cases along the way. One of them involved enforcing a minimum value for min_tick_spacing_px, preventing potential divide-by-zero errors when calculating the tick spacing.