[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?
|
- From: "Mikhail Kalugin" <mikhail.kalugin@xxxxxxxxx>
- Date: Wed, 7 May 2008 13:52:38 +0700
- Delivered-to: platform-swt-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=z+lbjGM4HBggfZtxuXVYs3GxsuYKMrY6R5Ua2O0oG8c=; b=qEP8AEx7i3u33t3JxZmGfuSgCt46x+MBiq298ON/yiB68a8ypa+Pv2q8pgt8a79ogtwHGhOvz6zuZtq3Ctr/lbTGqPBvbM44fqL+0Yo4NLyYH9LmtgxHtKBk8GnuTaeQ35sSPzaEHU6eJ18+CI7QTJc2ypubKOInvaRLUZQh+/U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Ggj5DWe9O0fzgqvGiXe47QczFVK2oAYI4MWGACySIZMetTEs7OmbS7r35cb6biXrqlDj5s1Nl4BxuAIXpA+d37BVFvX8C+gwTko+U6OIhe74B3VZxzJBnEjIAfynTKvpbtJbyu7Vg5ZS57bSszEM0kijHfBAPwfl59EADnMR9yU=
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