Comments (15)
Not at the moment.
However there are DOM-level window
methods:
- moveTo / moveBy
- resizeTo / resizeBy
They are not doing anything right now, but if enabling them is easy, i'd add that option to this module.
from node-webkitgtk.
I think i found the code in epiphany to make it work ! Trying...
from node-webkitgtk.
I added support in version 4.8.0. If you could test it before i publish, it would be awesome.
Here only "resizeTo" works but not perfectly. I suspect gnome-shell or wayland ignores gtk_window_move
calls.
from node-webkitgtk.
i think i can't test it cuz i'm using wayland
from node-webkitgtk.
which branch ? i'll try to boot to my other OS that using X
from node-webkitgtk.
You can use master branch, npm install kapouer/node-webkitgtk
should do it.
from node-webkitgtk.
it work, now my problem is how to expose an api to this webview, so that the running javascript can access it, is it using webkit2gtk-web-extension ?
from node-webkitgtk.
If you want to place the window from the node module, you can execute a js function inside the web page using
var dims = {
height: 400
};
webview.run(function(dims, done) {
window.moveTo(0, window.screen.height - dims.height);
window.resizeTo(window.screen.width, dims.height);
done();
}, dims, function(err) {
});
from node-webkitgtk.
You can also pass parameters to caller (like in this example) and the callee can return parameters, see README.md.
from node-webkitgtk.
okay thanks, btw how i can get the window id ?
i'm trying to use this library with node-x11 but i don't know how to get the window id, any clue ?
from node-webkitgtk.
I'm not sure i understand what's a window id. Could you find the relevant gtk doc ?
from node-webkitgtk.
some reference i've found:
- http://soc.if.usp.br/manual/libgtk2.0-doc/faq/x530.html
- https://stackoverflow.com/questions/1879326/how-can-i-retrieve-window-id-of-gtk-window
- https://developer.gnome.org/gtk3/stable/GtkWindow.html#GtkWindow--startup-id
The first one is in Gtk 2, i don't know if it works or not, the last one is from GNOME doc only startup-id that i found with the name id but i don't know if that is what i'm looking for.
from node-webkitgtk.
FYI i've released (node-webkitgtk version 4.8.1 with resizeTo/moveTo support.
from node-webkitgtk.
@kapouer thx man but i have made my own based on your code, cuz i need xid from gdk-x11.
and i think there is some issue with the window where i can't have window size lower than 200,
so i made some adjustment using input region.
If you are interested i can do a pull request, you can check my code here.
you can read the ISSUES file to know some common issues that i found.
from node-webkitgtk.
Interesting. I suppose several of these issues are libwebkitgtk-related.
Did you try the (updated) example here ?
from node-webkitgtk.
Related Issues (20)
- memleak involving WebKitNetworkProcess HOT 1
- faster view initialization with WEBKIT_DISABLE_COMPOSITING_MODE=1 HOT 1
- [doc] @page for setting print margins HOT 1
- run headless with weston HOT 2
- Empty window with transparent background and hanging process under weston HOT 9
- request events should not send all of data-uri by default
- selenium webdriver
- travis in docker HOT 1
- check ulimit and warn if low
- Build Error HOT 1
- tests hang with webkitgtk 2.16 on debian/fedora HOT 2
- webkitgtk loads system extensions ! HOT 2
- support setting print ranges
- when a page is blank, pdf outputs error "Invalid page range"
- N-API !
- npm rebuild does not rebuild webkitgtk
- Do you have problems running tests in Travis CI? HOT 3
- [email protected] install error HOT 2
- uv and gtk loop integration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-webkitgtk.