Programmatically Add/Remove displays on macOS - objective-c

I'm looking for an API to add and remove displays to/from the system. I've found the Quartz Display Services, but that API mainly lets you modify existing displays for the sake of fullscreen mode for apps and games.
For example, I would like to (via software) disable a display that's currently plugged in, while it is still plugged in. (Kind of like mounting and unmounting for drives)

Related

chrome command line flag for auto sharing system sound

I am developing web automation of Zoom meeting (all the way from creation till joining and leaving thereon).
I have been able to complete the creation, joining and screen sharing automation.
I am using --auto-select-desktop-capture-source=MyTab flag to automatically share the desired tab. Up until here, its all working fine.
Where I am stuck is that the chrome tab gets shared without system sound.
I want to automatically share the screen/tab along with system sound / tab audio.
What is the appropriate chrome flag for sharing audio along with screen?

AppleScript to access system Now Playing, without iTunes

I'd like to have a script that does something every time the current playback changes, i.e. something different is displayed in the Now Playing widget in Notification Centre. All the solutions I found involved telling iTunes to give AppleScript the information, however, my script shouldn't work solely with playback from iTunes, but primarily Safari (SoundCloud web). Any way Now Playing data is accessible using AppleScript, independent of iTunes?

Reveal (or Snap) Windows 8 App when system receives push notification

Can anyone enlighten me as to how one would be able to trigger a "non standard" realtime notification on a Windows 8 machine? My objective here was simply to find a slick method through which the end user is presented with an enhanced notification slide displayed via a slide in/5 second fade out dialog box.
Best example I can think of to illustrate what I am trying to achieve would be thinking of it like when the charms bar is presented which can automatically fade away. I simply require that this enhanced notification layer is somewhat customizable in order for me to provide summary content along with 3-4 buttons a user can press directly. This notifications needs to be triggered automatically upon the system receiving a push notification.
I have loomed into various "notification" methods such as default windows notifications, offline Google Apps notifications,... problem however is that they all seem not to allow me to customize the notification window to meet my needs.
Any suggestions / examples would be very helpful.
BTW - as an alternative solution - is there simply a way that I might be able to have Windows automatically load and "snap" into view the contents of a specific Windows app containing my content to the left or right side of the screen (upon receiving a push notification vs displaying the standard toast bubble?
Are you looking for something like growl?

How do I change the master audio volume in my app programatically?

I would like write an app where I can manipulate the currently playing song (from the Music app for example) such as jumping to the next song in playlist, restarting it or setting the volume up.
I searched the Windows SDK and tried all samples that seemed relevant to my problem, but I could not find anything that would give me a hint regarding how to do this.
So I would like to ask - How do I mute or change the master volume in my Metro (Windows 8) application?
Metro apps are not allowed to make changes to the system settings. So controlling the Master Volume is not possible from within the metro app. that's y Microsoft provides a settings charm where you can change the volume. the setting's charm is available in right side of your screen.
you can go through this link on MSDN for further clarification
Controllling master volume from with the App

'Open In' functionality after downloading document?

I am developing an iOS app that allows users to download documents off a server. I have gotten this to work fine and they can even view the document. What I want, though, is for the document to have an 'Open In' action so, when a button is pressed, the user is able to select another application that allows you to look at PDF documents -- for example, the Kindle App. Is this possible?
Darn, I was wishing you were going to say "MacOS" because that would have made the answer a lot more fun (and do-able).
As far as I know, iOS still does not have an official SDK-legal way to have one app (your app) arbitrarily launch other app and specify an arbitrary document to open with it. This is part of the magic (?) of having to live within your own app sandbox.
On the Macintosh, this would be easy with Apple Events (among other things).