Re: Finding JavaScript symbols from GObject Introspection bindings
- From: Emmanuele Bassi <ebassi gmail com>
- To: Jon Kristensen <info jonkri com>
- Cc: "javascript-list gnome org" <javascript-list gnome org>
- Subject: Re: Finding JavaScript symbols from GObject Introspection bindings
- Date: Tue, 6 May 2014 09:51:13 +0100
hi;
On 5 May 2014 13:56, Jon Kristensen <info jonkri com> wrote:
I look forward to seeing the API references. Will there be an
announcement on this list, or should I subscribe to some other channel?
pretty sure we'll announce far and wide when that happens. :-)
And about the specific problem... Is there some way that I can "copy" a
string to the current/main clipboard, so that it can be pasted later (in
another program), using the current JavaScript API?
I don't think so, no.
When I try to use `clipboard.set_text' (after having initialized
clipboard with `new Gtk.Clipboard()'), I get an error saying "Widget not
within a GTK window".
I am afraid you cannot create a GtkClipboard instance by yourself: the
API that provides you with one does more than just creating an
instance.
most of the clipboard API is pretty bad, and it's really barely
bindable (with or without introspection). we're in the process or
rewriting it for the Wayland porting effort, so you can expect a
better API, hopefully soon.
ciao,
Emmanuele.
On Mon, 2014-05-05 at 09:47 +0100, Emmanuele Bassi wrote:
hi;
GDK_SELECTION_CLIPBOARD is not available in the introspection data
because it's a macro that evaluates to a complex expression, and
cannot be parsed by the introspection scanner.
we are going to add simple wrappers for gtk_clipboard_get() in GTK+
3.14, and those will be introspectable correctly. in theory, you could
use `Gdk.atom_intern('CLIPBOARD', true)`, but in practice the GdkAtom
type is also not introspectable because it's an opaque pointer.
as for the documentation: we are in the process of generating all API
references for all bindings based on introspection using the
introspection data. we recently had a hackfest in Berlin on this very
topic (amongst others) so you should be able to expect results and
announcements soon.
ciao,
Emmanuele.
On 5 May 2014 07:44, Jon Kristensen <info jonkri com> wrote:
Hello, everyone!
I have one specific question, and one question of a more general nature.
First, what are the JavaScript symbols I can use for selection in
<https://developer.gnome.org/gtk3/3.12/gtk3-Clipboards.html#gtk-clipboard-get>? I'm using GJS and is
trying to find the equivalent of GDK_SELECTION_CLIPBOARD.
On a more general level, I would like to know how I can go about finding
out the names of these binding symbols generally. Is there perhaps some
way that I can inspect the GI files? Is there some documentation laying
around somewhere that I have failed to find?
If not, is there a way that we could produce such an API documentation
(perhaps annotated with the names of the functions in the underlying
language), so that people unfamiliar with the bindings could find what
they are looking for more easily?
Thanks!
Warm regards,
--
Jon Kristensen
0730 - 862 982
http://www.jonkri.com/
_______________________________________________
javascript-list mailing list
javascript-list gnome org
https://mail.gnome.org/mailman/listinfo/javascript-list
--
Jon Kristensen
0730 - 862 982
http://www.jonkri.com/
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]