Gtk.Label.prototype.get_layout_offsets
function get_layout_offsets():void { // Gjs wrapper for gtk_label_get_layout_offsets() }
Obtains the coordinates where the label will draw the Pango.Layout representing the text in the label; useful to convert mouse events into coordinates inside the Pango.Layout, e.g. to take some action if some part of the label is clicked. Of course you will need to create a Gtk.EventBox to receive the events, and pack the label inside it, since labels are a #GTK_NO_WINDOW widget. Remember when using the Pango.Layout functions you need to convert to and from pixels using PANGO_PIXELS() or #PANGO_SCALE.