Re: [evince] plugin: save document interaction
It seems to be mostly Gtk but the filenames AFAICT go with the document not view. It looks like the document interface has a get uri function but you would have to look. EvDocument *document = view->document; #include #include #include From: Stan Srednyak Sent: Monday, October 28, 2019 8:16 PM To: Mike Marchywka Subject: Re: [evince] plugin: save document interaction thanks for your replies. If I got you right, there are variables in ev-view.c that contain 1) filename 2) cursor position 3) "scroll information" ( btw, how is the scrolling implemented?) what are the names of these variables? On Mon, Oct 28, 2019 at 5:30 PM Mike Marchywka via evince-list mailto:evince-list@gnome.org>> wrote: On Mon, Oct 28, 2019 at 09:35:30AM -0600, Jason Crain wrote: > On Mon, Oct 28, 2019 at 09:37:46AM -0400, Stan Srednyak via evince-list wrote: > > I would like to have a plugin for evince that upon a scroll of a document, > > would save ( in a specified file) the time of the scroll event and the new > > position of the scroll bar ( for the given document). > > > > How do I write such a thing? > > Evince doesn't have that kind of plugin so this would require code > changes to evince, possibly in EvWindow or EvView. Evince does have > backends for different document formats, which are loaded via a plugin > system, but the kind of plugin you are talking about is different. One of the reasons I sent the mouse click positions as time stamped datagrams was to develop a general set of plain "c" code to hack around interfaces for hacks like this. It is also a good base for remote attachment. You might be able to work out a reasonable scheme to just broadcast stuff and receive commands to invoke some methods- I need to reload the pages for example- and then the control logic can go anywhere. While maybe "void*" is not the most OO data type, you can pass pointers and strings and whatever in any agreed upon way :) Much of this stuff should be just calling existing functions and can be quite separate although you need some hook to get the event info to send. > ___ > evince-list mailing list > evince-list@gnome.org<mailto:evince-list@gnome.org> > https://mail.gnome.org/mailman/listinfo/evince-list -- mike marchywka 306 charles cox canton GA 30115 USA, Earth marchy...@hotmail.com<mailto:marchy...@hotmail.com> 404-788-1216 ORCID: -0001-9237-455X ___ evince-list mailing list evince-list@gnome.org<mailto:evince-list@gnome.org> https://mail.gnome.org/mailman/listinfo/evince-list ___ evince-list mailing list evince-list@gnome.org https://mail.gnome.org/mailman/listinfo/evince-list
Re: [evince] plugin: save document interaction
On Mon, Oct 28, 2019 at 09:35:30AM -0600, Jason Crain wrote: > On Mon, Oct 28, 2019 at 09:37:46AM -0400, Stan Srednyak via evince-list wrote: > > I would like to have a plugin for evince that upon a scroll of a document, > > would save ( in a specified file) the time of the scroll event and the new > > position of the scroll bar ( for the given document). > > > > How do I write such a thing? > > Evince doesn't have that kind of plugin so this would require code > changes to evince, possibly in EvWindow or EvView. Evince does have > backends for different document formats, which are loaded via a plugin > system, but the kind of plugin you are talking about is different. One of the reasons I sent the mouse click positions as time stamped datagrams was to develop a general set of plain "c" code to hack around interfaces for hacks like this. It is also a good base for remote attachment. You might be able to work out a reasonable scheme to just broadcast stuff and receive commands to invoke some methods- I need to reload the pages for example- and then the control logic can go anywhere. While maybe "void*" is not the most OO data type, you can pass pointers and strings and whatever in any agreed upon way :) Much of this stuff should be just calling existing functions and can be quite separate although you need some hook to get the event info to send. > ___ > evince-list mailing list > evince-list@gnome.org > https://mail.gnome.org/mailman/listinfo/evince-list -- mike marchywka 306 charles cox canton GA 30115 USA, Earth marchy...@hotmail.com 404-788-1216 ORCID: -0001-9237-455X ___ evince-list mailing list evince-list@gnome.org https://mail.gnome.org/mailman/listinfo/evince-list
Re: [evince] plugin: save document interaction
On Mon, Oct 28, 2019 at 09:37:46AM -0400, Stan Srednyak via evince-list wrote: > I would like to have a plugin for evince that upon a scroll of a document, > would save ( in a specified file) the time of the scroll event and the new > position of the scroll bar ( for the given document). > > How do I write such a thing? Evince doesn't have that kind of plugin so this would require code changes to evince, possibly in EvWindow or EvView. Evince does have backends for different document formats, which are loaded via a plugin system, but the kind of plugin you are talking about is different. ___ evince-list mailing list evince-list@gnome.org https://mail.gnome.org/mailman/listinfo/evince-list
[evince] plugin: save document interaction
Hello, I would like to have a plugin for evince that upon a scroll of a document, would save ( in a specified file) the time of the scroll event and the new position of the scroll bar ( for the given document). How do I write such a thing? ___ evince-list mailing list evince-list@gnome.org https://mail.gnome.org/mailman/listinfo/evince-list