Skip to main content

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

Hi, folks,

Is there a way to return a struct from Java code back to Cocoa? For
example, the following delegate methods need to return NSSize to work
properly:

- (NSSize)drawerWillResizeContents:(NSDrawer *)sender toSize:(NSSize)contentSize
- (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize

I've found Display.windowDelegateProc(...) methods which are used for
other callbacks but they are supposed to return (int).

Unfortunately drawerWillResize... and windowWillResize... methods is
the only way to handle resizing of the NSDrawer control and
consequently to update the layout when the drawer is being resized.

-- 
Mikhail Kalugin


Back to the top