How to create a screenshot on Gnome Wayland using c++? - wayland

The code using org.gnome.Shell.Screenshot does not work anymore, because GNOME Shell screenshot API no longer allowed. I receive "AccessDenied: Screenshot is not allowed."
Can my desktop application get any permission to create a screenshot? Should I write Wayland compositor? Is there any ideas?
For example, macOS shows security alert with Allow/Deny buttons.

Related

Detect window closing action flutter desktop

I am working on flutter desktop application and want to show alert dialog before closing window. Could not get any information about detecting window closing action.
Can anyone tell me how to do this. Thankx.
You can do it using the existing flutter_window_close package. Check out the example here.
This plugin lets your Flutter app a chance to confirm if the user wants to close your app. It works on desktop platforms including Windows, macOS and Linux.
Try to explore as well bitsdojo_window.

open the local macOS help/user guide window programmatically

Is there a way to open the macOS user guide/help of a specific topic on the machine itself?
For example I want to link this article from my application to the official Apple help: https://support.apple.com/guide/mac-help/mchlp2290/mac
Instead of opening the browser I would like to open the included macOS help window. Why? Because it's offline available, natively in macOS included, translated to the users language and includes useful links.
To display content in the built-in Help window, you need to include a "Help Book" in the app.
https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/user_help_intro/user_assistance_intro.html
Once you've done that, the "Help Book" can contain anchors, and you can call openHelpAnchor(_:inBook:) to open the Help window showing that anchor.

Issues when sharing screen using Vidyo Screen Share Chrome extension on Vidyo.io

I'm using vidyo.io as videoconference solution in our platform. I'm having an issue with Vidyo's Chrome extension for screen sharing that is easily reproducible using the very own Vidyo's samples:
If you download Vidyo's web sample from developer portal, open samples/VidyoConnector/js/VidyoConnector.html in Chrome, choose 'Join via the browser', and click the 'Window share' select list (there is no need to start a conference to reproduce the error), Chrome will open the Vidyo Screen Share extension page twice, even if you already have the plugin installed. For this to work you have to uninstall the extension and reinstall it again. It will work until the end of the current session.
In the other hand if you go to Vidyo.io developer portal, choose "Demo" from "Developers" menu and start a conference using the "Join via the browser" button, click the same 'Window share' select list the Vidyo Screen Share extension works as expected, allowing you to pick a window or a screen to share.
In our implementation we're having the same problem as the code from web sample listed above, but if an example of our code would be of any help to clarify the issue, here you have an excerpt (we're using Angular, and here you have some TypeScript code):
private vidyoConnector: VidyoClientLib.VidyoClient.VidyoConnector;
(...)
selectedWindowShare(share: VidyoClientLib.VidyoClient.VidyoLocalWindowShare) {
this.vidyoConnector.SelectLocalWindowShare({localWindowShare: share})
}
This issue happens only on Chrome. When we use Firefox it works seamlessly. I'm using Chrome 69 on OSX High Sierra.
Any suggestion on how to solve this will be much appreciated. Thanks in advance!
If I am not mistaken, you are either running the VidyoConnector.html directly in the browser or hosting the sample on non-secured hosting (HTTP).
For the Vidyo Screen Share Chrome extension to work correctly, you need to host it on a secured hosting (HTTPS).
You can verify this by using our hosted sample here:
https://static.vidyo.io/latest/connector/VidyoConnector.html
Hope this helps.

Select a calendar dialog window from console app

I have a console app written with Swift to add events and reminders. I need be able to show 'select calendar' dialog from it. Is there any standar way to show this dialog or it needs to be created manually using NSAlert?
Sorry, kind of newbie in mac development, need this console app to interact with macos through electron app.

is there any api to make a shortcut of chrome standalone app to a desktop

normally what happens when you install an app is that it creates a shortcut from where you can launch it on desktop or start menu. However, chrome apps for now are places in chrome app launcher that is packed with all other chrome apps. It's all good and fine. But is there a way to place my app on desktop with user's consent if need be.
There is a way to do it manually. Like if user right clicks on the app in chrome app launcher and click create shortcut which has checkboxes showing places where shortcuts are going to be created ex: desktop, startmenu...
Without a icon of your app on desktop it still doesn't feel like a standalone app.
You can check out the chrome.management.createAppShortcut API that is added recently. Now it's only available on the dev channel:
chrome.management.createAppShortcut("app_id");
There is no way to do this. Users can also drag their app from the app launcher to the desktop to create a shortcut.
An API to prompt the user for this isn't something we're likely to support. Personally I think users would find it annoying, as it is simple and easy to create shortcuts where they want.
If you disagree please file a feature request at http://crbug.com. It would be there is some action we could take, e.g. educate users better that they can create shortcuts, but crbug.com is a better place to discuss.