macos-carbon

Setting the front most window using accessibility API

浪子不回头ぞ 提交于 2021-02-18 07:35:09
问题 I want to set a certain window, from an external app (for example textedit), to be front most. I can successfully get a reference to the app itself using GetFrontProcess, and check whether it is front most. If it is not, I can use setFrontProcess to make it focussed. I can then use the the accessibility API to examine all the windows under that application. I am checking that a certain window exists, and if so I compare it against the front most window of the application: //get the front

Setting the front most window using accessibility API

萝らか妹 提交于 2021-02-18 07:32:24
问题 I want to set a certain window, from an external app (for example textedit), to be front most. I can successfully get a reference to the app itself using GetFrontProcess, and check whether it is front most. If it is not, I can use setFrontProcess to make it focussed. I can then use the the accessibility API to examine all the windows under that application. I am checking that a certain window exists, and if so I compare it against the front most window of the application: //get the front

Setting the front most window using accessibility API

蓝咒 提交于 2021-02-18 07:32:13
问题 I want to set a certain window, from an external app (for example textedit), to be front most. I can successfully get a reference to the app itself using GetFrontProcess, and check whether it is front most. If it is not, I can use setFrontProcess to make it focussed. I can then use the the accessibility API to examine all the windows under that application. I am checking that a certain window exists, and if so I compare it against the front most window of the application: //get the front

How to write an OS X application that can effect changes (custom cursor, draw an image) even when it is not active?

孤人 提交于 2021-02-10 12:39:57
问题 I previously asked a question about changing the cursor system-wide on OSX. I used NSCursor to change the cursor, but the effects are only as long as the application is active. When another application becomes active, the custom cursor is lost. Here is a related, more general question. How can you write an application to have system-wife effects? For example drawing an image on-screen even when your application is not active, and something else is? I understand I probably need to go at a

How to write an OS X application that can effect changes (custom cursor, draw an image) even when it is not active?

风流意气都作罢 提交于 2021-02-10 12:31:55
问题 I previously asked a question about changing the cursor system-wide on OSX. I used NSCursor to change the cursor, but the effects are only as long as the application is active. When another application becomes active, the custom cursor is lost. Here is a related, more general question. How can you write an application to have system-wife effects? For example drawing an image on-screen even when your application is not active, and something else is? I understand I probably need to go at a

How to write an OS X application that can effect changes (custom cursor, draw an image) even when it is not active?

99封情书 提交于 2021-02-10 12:31:47
问题 I previously asked a question about changing the cursor system-wide on OSX. I used NSCursor to change the cursor, but the effects are only as long as the application is active. When another application becomes active, the custom cursor is lost. Here is a related, more general question. How can you write an application to have system-wife effects? For example drawing an image on-screen even when your application is not active, and something else is? I understand I probably need to go at a

Multiple applications in a single bundle

亡梦爱人 提交于 2021-01-21 08:36:38
问题 I am developing a multi-platform presentation application which consists of two parts: An editor part and a viewer part. Both parts are developed as separate programs. The user edits the individual slides using the editor and the editor then launches the viewer whenever the user wants to see his presentation. On Windows the editor can simply run the viewer by doing a ShellExecute(). On Linux systems the editor could just fork() the viewer but on Mac OS X this looks like it could get

How to display an input box in Mac OSX using c++

故事扮演 提交于 2020-06-16 07:17:38
问题 Ok. here is the situation, I am an average c++ developer. I do not have any prior experience of working with Objective C or Cocoa for that matter. I am working on a project currently in OSX with Carbon [I am NOVICE in carbon as well], and been coding in pure C++ for 3 months. Now I am facing an issue where I have to display an input box to the user, and get some input from him, say USERNAME, having literally no knowledge of how input boxes are displayed in OSX, what are my options. I have

macOS Catalina - Onscreen (virtual) Keyboard not working

淺唱寂寞╮ 提交于 2020-01-24 13:55:08
问题 I have been using below code to show the virtual onscreen keyboard and so far working good till 10.14 but it's no longer working on Catalina (10.15). On Catalina it is no longer able to create Input sources and it is always empty - + (void) showHideVirtualKeyboard:(BOOL) shouldShow { NSDictionary *property = [NSDictionary dictionaryWithObject:(NSString*)kTISTypeKeyboardViewer forKey:(NSString*)kTISPropertyInputSourceType]; NSLog(@"showHideVirtualKeyboard my dictionary is - %@",property);

How do I give my app “assistive access privileges” once “Enable Access for Assistive Devices” has been checked?

寵の児 提交于 2020-01-13 06:04:13
问题 I have an app that uses a (perfectly user-benevolent) system-wide keyboard hook for accessibility purposes. When the app starts up, I check if the "Enable Access for Assistive Devices" setting is checked, as asked by someone else here: Programmatically determine if "enable access for assistive devices" is checked in Cocoa app My problem is that, even after Enabling Access via the checkbox, the app continues to run without those privileges. How do I give the (currently running) app the