carbon

Get application icon from ProcessSerialNumber

I would like to get the application icon for all foreground applications running on my Mac. I'm already iterating over all applications using the Process Manager API. I have determined that any process that does not have the modeBackgroundOnly flag set in the processMode (as retrieved from GetProcessInformation()) is a "foreground" appli...

Is it possible to detect that whether any modal dialog box is open over main window?

Hello All, Is it possible to detect that whether any modal dialog box is open over main window? If yes then how? I am using Qt, Mac, Carbon. Thanks Rahul ...

wxOSX/Carbon: wxGLCanvas mouse offset in non-floating window classes

Hi All, I mainly program plugins using wxWidgets within a Carbon bundle which is loaded at runtime. The host-applications where my plugins are running in provide a native window handle (WindowRef), which I can use to add my custom, wxWidgets-based GUI-classes. To use the native window handle with wxWidgets classes I had to write a wxTo...

How to customize the Combobox dropdown list?

I have created a Combo box using HIComboBoxCreate(). When I have a long string in the dropdown list, it goes beyond the screen and the starting of the string is not visible. I want the string to be truncated with ellipsis in such a case. I have looked into the ComboBox attributes but couldn't find any that I can use to set this. I'm read...

How to see bounds of RgnHandle passed to SetPortVisibleRegion in Instruments?

I've got a difficult drawing bug that I am trying to track down. I know what is going on - during the draw routine, the region returned by GetPortVisibleRegion is wrong. I believe it is because someone has done something to cause SetPortVisibleRegion to be called with the bad region. I cannot just search for all of the calls to SetPortVi...

How to move from Eclipse Carbon to Cocoa 64-bit?

I'm using Eclipse Carbon now and I have some installed Plugins. How to move to Eclipse Cocoa 64-bit without losing the plugins and settings?? ...

Programmatically check if a process is running on Mac

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 running (by name). Thanks! ...

How to set the cursor in kEventControlSetCursor?

I want to be able to change the appearance of the mouse cursor as it moves over various hot spots in my view's and it seems to me that I should be doing that in the kEventControlSetCursor handler (which I can get). The function "SetCursor" is deprecated, which leads to the question, what do I call to actually change the cursor? And is t...

How do I get a bundle reference from inside of a plugin with carbon?

I'm writing a C++ plugin in Mac OS X using the Carbon framework (yeah, yeah, I know, Apple is deprecating Carbon, but at the moment I can't migrate this code to Cocoa). My plugin gets loaded by a master application, and I need to get a CFBundleRef reference to my plugin so that I can access it's resources. The problem is, when I call C...

Carbon Calls failing?

HI All, My Carbon calls are failing. I have: #include <Carbon/Carbon.h> in my PCH. I have: /Developer/Headers/FlatCarbon in my Header Search Path But calls like: aDialog = GetNewDialog(16002, NULL,(WindowPtr) (-1L)); are failing saying: GetNewDialog not declared in this scope. I am targeting 10.5 64-bit intel. ...

Change the Cursor Image on Mac irrespective of which applicatoin is on Top

Hello All, I want to Change the Cursor Image on Mac irrespective of which application is on Top or in focus. Can some one direct to related source code or some hints would be helpful? I am using Carbon, C++ Thanks Rahul ...

Alternative Menu Items in NSMenu

Hi, I have an NSMenu that contains NSMenuItems with custom views. I want it so that when the alt button is pressed, the menu items would change part of their look (through their view). I found setAlternative in the NSMenuItem docs, however, in practice I could only get it to work with NSMenuItems without custom views. As soon as I se...

(MACOSX) - Knowing whether a mounted device was mounted from a DMG

Well the title says it all - couldn't find that info using DiskArbitration or FSGetVolumeInfo/GetVolumeParms... I know that hdiutil uses a private framework called DiskImages framework, but I wouldn't want to run an external utility each time I want this info... wheres the API for this ? Thanks. ...

Find Window At Location Using Carbon And Carbon Problems In 64-Bit Applications

As I said in some questions today I´m looking for the way to get window or windowPart references at a certain location. Although I know I could use Cocoa for this purpose (I don´t know how to do it yet) I prefer (and probably need) to do this using Carbon because the entire application that needs this functionality is written in C++ but ...

how to ignore hotkeys in os x

Hi, do the Mac OS X APIs provide a method to ignore all systemwide hotkeys? I'm currently researching how to build a kiosk-mode like application. I searched the OS X Developer documentation and tried google (combinations of [cocoa, carbon, os x, ignore, global, hotkey, kiosk, event]), but nothing turned up yet. I know this has been d...

NSOpenGLView in NSSplitView

When i put an NSOpenglView in NSSplitView, a problem occurs while dragging splitter. The openGLView and SplitView are resizing asynchronously. i found a solution in apple mail list thread http://developer.apple.com/mac/library/samplecode/GLChildWindowDemo/Introduction/Intro.html and i found a solution with some carbon calls. but now i g...

Is there a Cocoa equivalent of Apple Event Manager?

Is there a way to handle Apple Events (namely starting the app from a custom protocol link like myapp://do/something/cool) without using the Carbon APIs? If not, is it safe to assume that these APIs are not going to go away in the next release of OS X? ...

How can you load a font (TTF) from a file using Core Text?

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. ...

How to hide/show title bar using Carbon

How to hide/show title bar using Carbon in Mac? ...

Clip mouse movement in Carbon

How can I clip the mouse movement into a window Region using Carbon? ...