Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Drag cursors in Cocoa


I think that's what we should do.  Just go ahead and call it and link dynamically using the JNI gen tool.  It's an option on that you set that looks up a function symbolically.  See the generated file os.c on the other platforms to see what I mean and ask here if you get stuck.  Make sure you add the function with the rest of the carbon calls in OS.java so the generator doesn't get confused.

As a matter of style, even though calling a dynamically generated function does nothing, we normally wrap it with a test before we make the call to indicate in the code we are "bad".

if (OS.PTR_SIZEOF == 4) {
... 32-bit code here..
}



Scott Kovatch <skovatch@xxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

09/18/2008 06:02 PM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] Drag cursors in Cocoa





Hi,

In the Carbon version of SWT, SetThemeCursor is being used to set the cursor for copy, alias, and ‘invalid drag’ situations. In Cocoa we should use something in NSCursor, but oddly, no Cocoa equivalent is available. See this page:

<
http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGCursors/chapter_16_section_2.html>

SetThemeCursor isn’t available in 64-bit, however. Could we try to work around this situation by generating the JNI glue for SetThemeCursor and wrap it in a ‘no 64-bit’ ifdef so it becomes a no-op in x86_64? It’s taking away functionality that was there in the Carbon version, but there’s no alternative I can see.

I’m pretty confident that Apple will remedy this in 10.6, as there’s an effort to remove these situations where you have no choice but to use a Carbon API, but obviously that won’t help us here.

Any thoughts?

Scott
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top