Comments (10)
Please don't make a keylogger @JafarAkhondali 😂
from proton-native.
@albinekb LOL 😅 Who would create a keyloggger in 2018 using react? 😺
I've developed a client for an device using tcp sockets() and electron, But sometimes we need to minimize the window of our application and have the same functionality
from proton-native.
I was thinking the same... maybe we need to use a nodejs server for system calls?
for example file system could be exposed through a graphql request?
from proton-native.
That wouldn't be part of this package, but another. I'm not familiar with doing this in node so I wouldn't know.
from proton-native.
Hi @kusti8, I'm libui-node author. I gave a look at how you implemented the event loop here: https://github.com/kusti8/proton-native/blob/master/src/eventLoop.js
It's similar to how the event loop of libui-node works in early release. As far as I can say, node calls should work just fine (but I didn't try yet).
And system calls like logging keys should work too... You could try to use my https://github.com/parro-it/screen-info and see if it work.
Anyway these event loop implementation is highly CPU intensive, because it is based on polling (~4% CPU on an inactive, simple window).
In later libui-node versions, I implemented a background thread version of some part of the loop that is way more performant, but is actually not working on macOS.
And I was not able to find a way to make the same trick work on Windows, that is still using the poor performance polling.
from proton-native.
from proton-native.
Yeah I implemented it after I released it because of the macOS error.
I'm thinking of restoring an old version for macOS that should work on last os versions, but involve the use of the an internal, undocumented call _dispatch_get_main_queue_port_4CF
.
I have no solution for Windows yet... but we discussed on libui repos in 2016 and it seems there could be a possible solution.
Node callbacks should work since it's just an event loop, and it calls refresh on the same
thread.
I agree.
from proton-native.
I saw only around .4% CPU utilization but I don't know how it is
for others.
I think libui, libui-node and proton-native are attractive because they are lite-weight alternative to electron, and so they probably they will be used more often on low-range CPU, where, sadly, the polling-penalty is more heavy.
from proton-native.
Yeah I understand. I don't know enough to work out a cross platform event loop. I would love something that uses native threads, but it's obviously hard to work out.
from proton-native.
I'm closing it as it seems that the OP question has been answered. @parro-it feel free to create a separate issue to track this closer.
from proton-native.
Related Issues (20)
- Need to update install instructions HOT 1
- What is the difference between Proton Native and React Native for Windows by Microsoft ? HOT 1
- Embedded database
- example use of HTML5 canvas
- How do I add screen management to my project
- Screen Management
- No matching version found for node-qt-napi@^0.0.4.
- Little typo error on proton-native wep page
- Error while running exe created
- [macOS] Create a spotlight-like window HOT 3
- Integrating with existing React-Native apps
- continuation HOT 5
- Error Executig npm start
- Unable to create a Proton-Native App in Raspberry Pi 4B HOT 3
- Will anyone ever make a fork of this repo? HOT 16
- Problems with converting the notepad example from js to tsx
- How do you log to the console? HOT 1
- Proton-native in 2022 HOT 1
- Usage on windows
- Display window above other Fullscreen windows (Games) on Windows OS
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 proton-native.