Re: Starting to write Seed extensions
- From: Jonthan Wadelius <wadelius gmail com>
- To: Diego Escalante Urrelo <diegoe gnome org>
- Cc: epiphany-list gnome org
- Subject: Re: Starting to write Seed extensions
- Date: Mon, 05 Apr 2010 17:48:57 +0200
I've been trying to figure this out today. In "reopen-closed-tabs" there is a call to Epiphany.EphyShell.get_default(), and I concluded that it is the same as "ephy_shell_get_default()" in "ephy-shell.c". However no other functions that I have tried work. Is there any way to open the file that is imported when I write "Epiphany = imports.gi.Epiphany"? Where is it located? That way I could know what works and what does not.
Thanks for the help!
sön 2010-04-04 klockan 13:40 -0500 skrev Diego Escalante Urrelo:
El dom, 04-04-2010 a las 19:54 +0200, Jonthan Wadelius escribió:
> Thanks for the quick reply! I've been looking at the two examples
> "reopen-closed-tabs" and "close-multiple-tabs" but don't understand
> yet how a function from the epiphany source is called from the seed
> extension. If I for example would want to call "ephy_session_save" in
> "ephy_session.c", how would I write the code?
You need to import Epiphany from the gobject introspection seed module,
sort of like this:
epiphany = imports.gi.Epiphany
(from the top of my head, it might be epiphany, in minus)
then you have access to all classes and functions, say
epiphany.EphyWindow and the like.
Check out this:
Those are auto generated documentation for all seed modules available,
I'm not sure how recent Epiphany's docs are, but probably can give you
Check also this about mapping of C names to seed ones, notice that it's
also included in seed tarball:
Like Xan said, hopefully we will improve this for this cycle. I could
tell you for example that calling some WebKit functions will crash you
(those with wrong ownership), keep that in mind if you start getting
weird crashes when using them :). Epiphany and GTK, and friends, should
be ok though.
Don't hesitate to ask!
] [Thread Prev