macos-carbon Questions

2

Solved

I'm trying to add modern OS X support to OpenTK framework. Mac OS Lion supports OpenGL 3.2 Core context. I can successfully obtain it by using CGL. However, I can't find a straight way to bind the ...
Elementary asked 12/8, 2011 at 13:50

3

Solved

When programmatically moving the mouse cursor, you must set CGSetLocalEventsSuppressionInterval to 0 so the events come in in real-time as opposed to with a 250 millisecond delay. Unfortunately, C...
Psychotic asked 17/4, 2012 at 18:8

3

Solved

I am working on an application that moves windows of third party applications around on the screen. To get an overview of all currently open windows, I use CGWindowListCopyWindowInfo(kCGWindowLis...

16

Solved

The Gestalt() function located in CarbonCore/OSUtils.h has been deprecated as of OS X 10.8 Mountain Lion. I often use this function to test the version of the OS X operating system at runtime (see...
Antiscorbutic asked 17/6, 2012 at 16:9

3

Solved

If you call TransformProcessType() like this : ProcessSerialNumber psn = { 0, kCurrentProcess }; (void) TransformProcessType(&psn, kProcessTransformToForegroundApplication); Then the cocoa...
Northing asked 29/9, 2011 at 11:27

3

Solved

I'm trying to automate a foreign OSX application using the accessibility API. Some of the state of the application isn't available through the API, so I acquire it through screen scraping. To do th...
Warrington asked 16/11, 2009 at 15:26

3

Solved

I have written a small productivity tool that does a few string manipulations via the clipboard. It is currently registering a hot key, where it pulls in the clipboard text, processes it, and dump...
Sheen asked 23/11, 2013 at 23:32

4

Solved

When we open Dropbox folder, we can see icon on the left bottom of the folder. I am developing an application in which i also want the same behavior. If folder is syncing then it will show sync ic...
Thenceforth asked 3/11, 2011 at 6:43

1

This answer about CopySymbolicKeys() gets you the keyboard combinations for System Shortcuts in OS X, but is there any way to get at the labels associated with those combinations? For example, I ...
Powerful asked 16/3, 2016 at 18:34

6

Solved

Is there any Carbon/Cocoa/C API available on Macs that I can use to enumerate processes? I'm looking for something like EnumProcesses on Windows. My goal is to check from code whether a process is...
Mishap asked 25/3, 2010 at 18:1

1

I have set up a global hotkey with RegisterEventHotkey. When the user presses it, it gets the currently focused window with CGWindowListCopyWindowInfo, and then I need to set it always on top. If ...
Escalade asked 18/3, 2016 at 2:40

4

Prior to OSX 10.6, ATSFontActivateFromFileSpecification/ATSFontActivateFromFileReference were available and could be used to load a font from a file. I can't find anything similar in Core Text.
Madge asked 24/4, 2010 at 3:20

2

I'm trying to use the accessibility API to get the active window, the problem is when I try to get the focused application I get a cannot complete error. Below is a small piece of my code: AXUIEle...
Rozanna asked 29/12, 2014 at 19:37

1

Solved

We need to use a AppleScript to create an outgoing email message in macOS. The script works fine in the Script Editor. Using the code recommended by DTS https://forums.developer.apple.com/message/3...
Lei asked 1/9, 2019 at 14:25

3

Solved

If a folder is placed in the Dock you can sort it by "date added" - this is usually the default for the Downloads folder. (Sometimes the Finder does not appear to be using the date added but the da...
Bedraggled asked 15/5, 2011 at 7:50

2

Solved

I'm trying to write a custom NSMenu which will be able to list for key input and intercept the necessary events. This is to provide a simple search-as-you-type functionality for my open source clip...
Civism asked 13/11, 2018 at 3:6

3

Solved

I am trying to find process type (32 bit/ 64bit) from process pid? I get the process information and process list from using GetBSDProcessList method described here. how can we get the process ty...
Revengeful asked 2/11, 2011 at 16:37

4

Solved

How can I get the current type of mouse cursor on screen? (Not only on my app window, globally.) Or is it at least possible to detect whether the default cursor is currently displayed? Either Carbo...
Twelve asked 20/11, 2011 at 0:6

9

Solved

Normally an application bundle on OS X can only be started once, however by simply copying the bundle the same application can be launched twice. What's the best strategy to detect and stop this po...
Palsgrave asked 26/3, 2009 at 8:14

6

Solved

Games need low-level access to keyboard input. On Windows, there's DirectInput. But what technology do Mac OS X game developers use? Obviously, there's enough Mac games which get keyboard input j...
Coomb asked 8/9, 2011 at 13:32

5

I need to set the position of the mouse on the screen. In some other similar question, it was suggested to use CGDisplayMoveCursorToPoint(CGDirectDisplayID display, CGPoint point), but I cannot fig...
Intercom asked 21/4, 2012 at 3:42

1

Solved

I'm trying to use Carbon's function RegisterEventHotKey to create a hotkey for when the command key is pressed. I'm using it like so: InstallEventHandler(GetApplicationEventTarget(), handler, 1, &...
Spearwort asked 30/1, 2017 at 1:22

5

Solved

How can I get the process details like name of application & real path of application from process id? I am using Mac OS X.
Lindsley asked 22/9, 2011 at 8:30

0

I am trying to launch the built-in calculator.app on my Mac(which means it is external to my application) within my application and force the calculator to stay frontmost permanently on screen. He...
Barlow asked 16/11, 2016 at 10:55

2

Solved

I'm writing an app where I need to simulate key press events on a Mac, given a code that represents each key. It seems I need to use the CGEventCreateKeyboardEvent function to create the event. The...
Schnapp asked 4/3, 2010 at 14:13

© 2022 - 2024 — McMap. All rights reserved.