Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] How to return NSSize from a Cocoa callback?

Hi, Grant,

Thanks for the detailed reply. All steps look totally clear. I'll try
them today.

On Tue, May 6, 2008 at 4:07 AM, Grant Gayed <Grant_Gayed@xxxxxxxxxx> wrote:
>
> Hi Mikhail,
>
> I think the following will work:
>
> -> add native method OS.memmove(int, NSPoint, int)
>     -> (just copy the existing OS.memmove(int, NSRect, int) method and
> change the type of the second parameter)
> -> regenerate the natives with the JNIGenerator tool
>     -> (get the tool from CVS HEAD project: org.eclipse.swt.tools)
>     -> (tool description: http://www.eclipse.org/swt/jnigen.php)
> -> compile the swt libraries:
>     -> remove target $(XULRUNNER_LIB) from the "all" target in
> /org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak
>     -> invoke /org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.xml
> target: build_cocoa_lib
> -> in your method:
>     -> int result = OS.malloc(NSPoint.sizeof);
>     -> OS.memmove(result, <yourNSPoint>, NSPoint.sizeof);
>     -> return result;
>
> If one of these steps gives you a problem then please follow up.
>
> HTH,
> Grant
>
> _______________________________________________
>  platform-swt-dev mailing list
>  platform-swt-dev@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
>



-- 
Mikhail Kalugin


Back to the top