On 1/5/17, Germán Arias <germanan...@gmx.es> wrote: > El mié, 04-01-2017 a las 22:24 -0800, Eric Wing escribió: > [...] >> Awesome! >> >> https://github.com/ewmailing/IupCocoa >> (Switch to the Cocoa branch) >> >> I actually took an implementation somebody else started with, so I >> haven’t audited/fixed all the code yet and am using it to bootstrap. >> There is some stuff that touches old Mac Carbon headers which will be >> the first obstacle for GNUStep. This stuff probably needs to be >> rewritten anyway for modern Mac, though unfortunately, I suspect >> GNUStep would have a different implementation too. > > No idea about this.
I recommend just commenting out all those things which produce a build error. We can try to sort it out after you get something building and hopefully running. >> I put in some stuff for CALayer (Core Animation) for some more >> advanced long term ideas I had. This will definitely not work on >> GNUStep (unless they surprised me and actually kept up with Apple >> circa 2007). I’m thinking maybe the best way to handle this is >> implement a dummy CALayer class that basically does nothing just to >> get things to compile. On the GNUStep path, there will never be any >> actual CALayers created, so the CALayer paths should never trigger. >> (I >> think all my CALayer uses are behind a class check of isKindOf.) > > There is a QuartzCore framework at GNUstep repository with a class > CALayer. But I have not used it, and I suppose this is incomplete. I > will ask. Wow. I'm impressed. So, I think you are good then and won't need to do anything for this. It actually doesn't need to be complete at this point for our purposes. My long term idea was to introduce extra Mac IUP attributes that would let you create or deal with CALayers instead of NSViews if there were appropriate reasons to do so. Some of the general utility functions I wrote need to distinguish between NSView and NSWindow so I felt like it would be easiest to also add the CALayer check now as I'm writing it. But there is no place a CALayer gets created, so these code paths won't get run. >> After some discussions with other experienced Cocoa devs I trust, we >> concluded that using ARC would be a bad idea for this project so I >> disabled it. I imagine that should be a really good thing for >> GNUStep. >> I do have some left over unsafe_unretained markers around, but we can >> remove those if they are a problem for GNUStep. > > Clang+GNUstep can support several new features at Objective-C. But I > have not used GNUstep with clang. That will be interesting to see. I'm trying to think of the new Obj-C features: - We aren't using ARC, so that should help a lot. - Blocks are probably the significant new feature which don't have a direct substitute. - Protocols extensions and the extra stuff they added to formalize protocols for delegate patterns is next. - Dot syntax is easy to work around. I never really cared for it anyway. - @property is kind of nice, but we could work around that too. - @synthesize is also work-around-able - NSDictionary and NSArray literals are also nice, but easy to work around. - @autoreleasepool, @try, @catch, @finally: I don't expect to use these often, but it would be interesting to know if we can use them. Still, if Clang is easy to get running with GNUStep and it gives us more features, maybe that would be better? > There are some apps ported to Linux/Windows using GNUstep with small > changes. So I guess this should not be so hard. With limitations, of > course, since GNUstep don't implement all Cocoa frameworks. > Okay. I expect this initial pass will be mostly AppKit centric since we're just getting started and everything is about basic/core widgets. CALayer from QuartzCore is hopefully the largest curveball. Though, I think for some of the image stuff, I am using CoreGraphics. Is that available? I think when get to IUP CD (canvas), we will need Quartz/CoreGraphics. > I will try at weekend and I'll let you know how it goes. > I look forward to hearing your results. Thanks, Eric ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users