Closed daym closed 3 years ago
symbol->dialog-flags
is missing, too.
Rather than trying to generate a list of functions, that are missing, you might want to try (gi documentation)
for generating reference documentation for what does exist. Since you are already acquainted with require
and load
, you can also wrap some of your load calls in (apply peek 'some-debug-key [YOUR LOAD HERE])
to see what symbols get defined.
Alternatively, you can also enable debug messages to see what gets/doesn't get loaded in real time along with information on what goes wrong where.
symbol->dialog-flags
is missing, too.
Because they're flags. You have list->dialog-flags
and number->dialog-flags
.
<constructor name="new_with_buttons"
c:identifier="gtk_dialog_new_with_buttons"
introspectable="0">
[...]
</constructor>
Yeah, that seems to be a feature.
Implementing that myself, I need to read the gtk source code and do some arcane stuff:
(define (dialog:add-buttons dialog buttons-and-responses)
(for-each
(match-lambda
((text response)
(dialog:add-button dialog text response)))
buttons-and-responses)
dialog)
(define (dialog:new-with-buttons title parent flags . buttons-and-responses)
(let ((dialog (make <GtkDialog> #:use-header-bar (and (member 'use-header-bar flags) #t)))
(set-title dialog title)
(set-transient-for dialog parent)
(when (member 'modal flags)
(set-modal dialog #t))
(when (member 'destroy-with-parent flags)
(set-destroy-with-parent dialog #t))
(dialog:add-buttons dialog buttons-and-responses)
dialog))
Therefore, I filed a bug report upstream: https://gitlab.gnome.org/GNOME/gtk/-/issues/3311
dialog:new-with-buttons
is missing. Maybe because of the varargs ?It would be nice to have a list of all such varargs-functions in
gi
, which are missing inguile-gi
. Does it exist ?Reading
Gtk
source, this function does some extra stuff.... where gtk_dialog_new_empty is not exported. It is: