Search found 108 matches

by mdp
Mon Feb 07, 2022 11:49 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

Ok, bad news in general:


dom_document is no longer used in new webkit_web_view (webkit2). Has been completely rewritten.
Its a own WebKitDOMObject g_object


Right. I understood differently as the documentation for WebKitDOMDOMWindow suggests in the hompage that it is still current, but having ...
by mdp
Mon Feb 07, 2022 9:33 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget


I have extended my modules for the WebGadget with RunJavaScript. It works
JavaScript 'window.scrollTo(0,500);'


By the way, Mk-Soft: I was just checking the documentation of webkit2gtk, since it's what we will have to deal in the future, and I noticed: the WebKitDOMDOMWindow is still present, as ...
by mdp
Mon Feb 07, 2022 9:09 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget


Very simple

Ubuntu 18.04 uses libwebkitgtk-3.0
PB v5.xx and PB v6.00 (18.04) also uses libwebkitgtk-3.0

Ubuntu 20.xx/21.xx uses libwebkit2gtk-4.0
PB v6.00 (20.04) also uses libwebkit2gtk-4.0
(Not quite perfect yet, as not everything works as with webkit1. Therefore my Module WebGadget Extension ...
by mdp
Mon Feb 07, 2022 7:57 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget


Does not run under Ubuntu 20.04/21.04 because the libwebkitgtk-3.0-dev is no longer available.


They removed libwebkitgtk-3.0-dev from the packages two years ago!? Nothing can surprise me anymore. But: how does the WebGadget of PB 5.xx work on Ubuntu 18.04 LTS then?

Edit: I must suppose there ...
by mdp
Mon Feb 07, 2022 3:08 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

And this is an example of the desired effect - which honestly works quite well, functionally and graphically. So, it may be deserving a pic.

https://ibb.co/D550y7H
by mdp
Mon Feb 07, 2022 1:53 am
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

So, by the way, the "multicolumn with scroll" effect I intended would be along the lines of


ImportC "-lwebkitgtk-3.0"
webkit_web_view_get_dom_document(*wkwv) ; WebKitWebView → WebKitDOMDocument
webkit_dom_document_get_default_view(*wkdd) ; WebKitDOMDocument → WebKitDOMDOMWindow
webkit_dom_dom ...
by mdp
Mon Feb 07, 2022 12:57 am
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

I friggin' made it, with the "GtkAdjustment vadjustment of GtkScrolledWindow" way, and it's been a #@!# journey.

So, webkit_dom_dom_window_get_scroll_y() works, but webkit_dom_dom_window_move_to() and similar do not; whereas
gtk_adjustment_get_value() does not, but gtk_adjustment_set_value() and ...
by mdp
Sun Feb 06, 2022 11:31 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget



By the way: can you use those javascript functions while keeping the webgadget in "disabled javascript" state?

I don't known, but I think not


Well, that would be a critical issue. It would be like being able to load a page, but, js being disabled, not being able to scroll or zoom. But ...
by mdp
Sun Feb 06, 2022 9:37 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

I tried the third way, and again no good result but it's there, close...

In theory, the traditional WebGadget should be wrapped inside a GtkScrolledWindow (what allows the scrollbars in that version of GTK), and gtk_scrolled_window_get_vadjustment should return a GtkAdjustment which contains the ...
by mdp
Sun Feb 06, 2022 9:29 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget


I have extended my modules for the WebGadget with RunJavaScript. It works


Thank you Mk-Soft,
it will surely be useful to extend functionality on PB6.xx, libraries webkit2gtk-4.0. Also because, I read that the multithreading feature of webkit2gtk make it a mess... By the way: can you use those ...
by mdp
Sun Feb 06, 2022 7:27 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

Incidentally: I also tried the "JavaScriptCore" way, as suggested by the API documentation, and I interpreted that as meaning "using JSEvaluateScript()".


ImportC "-lwebkitgtk-3.0"
webkit_web_view_get_dom_document(*wkwv) ; WebKitWebView → WebKitDOMDocument
webkit_dom_document_get_default_view ...
by mdp
Sun Feb 06, 2022 5:45 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget


with PB v6.00 (20.04) the Webkit 2 (only gtk3) is supported.


With the new PB, I see, the version the new API, WebKit2GTK, will have to be used, and new techniques adopted for the scrolling.

Nonetheless, it would be nice to make this one work, for completeness... Reading the scrolling position ...
by mdp
Sun Feb 06, 2022 4:23 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

In theory we are not far away; in practice, I can read the scroll position, but strangely cannot set it yet:

ImportC "-lwebkitgtk-3.0"
webkit_web_view_get_dom_document(*wkwv) ; WebKitWebView → WebKitDOMDocument
webkit_dom_document_get_default_view(*wkdd) ; WebKitDOMDocument → WebKitDOMDOMWindow ...
by mdp
Sun Feb 06, 2022 3:39 pm
Forum: Linux
Topic: Get and set scroll position in WebGadget
Replies: 23
Views: 4041

Re: Get and set scroll position in WebGadget

One note: I had difficulties already identifying the documentation:

on my system, it seems what I should use is what in https://webkitgtk.org/ is the "Deprecated API Reference WebKit1", https://webkitgtk.org/reference/webkitgtk/stable/index.html , as I am finding the working functions there ...
by mdp
Sun Feb 06, 2022 1:37 pm
Forum: Feature Requests and Wishlists
Topic: IDE Shortcut to Jump to declaration and Jump to calls
Replies: 4
Views: 1172

IDE Shortcut to Jump to declaration and Jump to calls

One feature I regularly miss on the PB IDE¹ is a keyboard shortcut that
-- jumps to the Procedure declaration when the cursor is on a procedure call,
-- shows a list of Procedure calls when the cursor is on a Procedure declaration
...in the style of Eclipse and IntelliJ Idea.

There is a keyboard ...