Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » Porting (Mac OS X) and "reference application" idea
Re: Porting (Mac OS X) and "reference application" idea [message #23633 is a reply to message #23631] Sat, 07 November 2009 22:47 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Thanks Andrei Natanel and all

Just a link about it: http://stackoverflow.com/questions/525609/use-c-with-cocoa-i nstead-of-objective-c

The forced mix seems to be Core in C++ & GUI in Objective-C + Cocoa.

Best regards
Koldo


Best regards
Iñaki
Re: Porting (Mac OS X) and "reference application" idea [message #23634 is a reply to message #23632] Sun, 08 November 2009 07:16 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
Reini wrote on Sat, 07 November 2009 23:32

Hi Guys,
Mirek would you like to open a separate Forum for Mac or so ? Or are you developers also good reachable via IM ? This would be my preferable way of communicating since the small steps would flood then the forum too much Rolling Eyes


You'll find Mirek ICQ address in /uppbox/developers.txt in svn repo. Other developers have ICQ too and you'll find their addresses in forum profile for each of them. (i personally dislike ICQ, it is too tied to their client, i.e. you cannot change your password from other client or even icq web site and their client is windows only).

I would like discussions to be in forum because in that way we(especially me) will learn about porting a piece of software, mixing languages, MacOSX architecture etc. and also get informed about porting progress.
Suggestion [message #23690 is a reply to message #23634] Fri, 13 November 2009 20:58 Go to previous messageGo to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello Mirek and others,

I just found an deprecated C++ Programming Framework called nano.
Probably we can take some ideas from there ?



Otherwise I would suggest just to start at first with the Core of U++ and start to port that stuff step by step to OSX ?

From the current wxWidgets Project I think we can borrow also a bit knowloedge Very Happy

In the meantime I am playing a bit around with XCode the official Apple Developer Tools.
Re: Suggestion [message #23691 is a reply to message #23690] Fri, 13 November 2009 21:23 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
Reini wrote on Fri, 13 November 2009 21:58


I just found an deprecated C++ Programming Framework called nano.
Probably we can take some ideas from there ?

Your link is not visible because you used html code Rolling Eyes
Nano Framework
Re: Suggestion [message #23692 is a reply to message #23690] Sat, 14 November 2009 05:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Reini wrote on Fri, 13 November 2009 14:58

Hello Mirek and others,

I just found an deprecated C++ Programming Framework called nano.
Probably we can take some ideas from there ?

<a href="http://www.refnum.com/software/nano/index.html" target="_blank"></a>

Otherwise I would suggest just to start at first with the Core of U++ and start to port that stuff step by step to OSX ?

From the current wxWidgets Project I think we can borrow also a bit knowloedge Very Happy

In the meantime I am playing a bit around with XCode the official Apple Developer Tools.


Actually, Core is the least problem, it will compile almost right away - OSX is basically BSD on that level, which is well supported.
icon5.gif  Re: Porting (Mac OS X) and "reference application" idea [message #23782 is a reply to message #9571] Sat, 21 November 2009 18:43 Go to previous messageGo to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello all,

I just checked a bit the XCode Development platform for Mac and realized that they follow the Model-View-Controler Pattern.

So the question is for me if it would be possible to put all in MVC Style to U++ or if its using also the MVC Pattern ?

Greetz
Re: Porting (Mac OS X) and "reference application" idea [message #23793 is a reply to message #23782] Sun, 22 November 2009 23:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Reini wrote on Sat, 21 November 2009 12:43

Hello all,

I just checked a bit the XCode Development platform for Mac and realized that they follow the Model-View-Controler Pattern.

So the question is for me if it would be possible to put all in MVC Style to U++ or if its using also the MVC Pattern ?

Greetz


No, but I think it would still be possible to do Cocoa U++.

Each window will simply consist of sigle view and MVC will implement U++ CtrlCore API. Obviously, using as little from Cocoa as possible (same is true for Win32 and X11).

Mirek
Re: Porting (Mac OS X) and "reference application" idea [message #28285 is a reply to message #23793] Thu, 26 August 2010 11:03 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
there is a core layer, called 'quartz' which could be used, without the need to have objective c++, trying to find out what we need for..but we wouldnt need cocoa..

Quote:


Introduction

Quartz 2D is an advanced, two-dimensional drawing engine available for iOS application development and to all Mac OS X application environments outside of the kernel. Quartz 2D provides low-level, lightweight 2D rendering with unmatched output fidelity regardless of display or printing device. Quartz 2D is resolution- and device-independent; you don’t need to think about the final destination when you use the Quartz 2D application programming interface (API) for drawing.

The Quartz 2D API is easy to use and provides access to powerful features such as transparency layers, path-based drawing, offscreen rendering, advanced color management, anti-aliased rendering, and PDF document creation, display, and parsing.

The Quartz 2D API is part of the Core Graphics framework, so you may see Quartz referred to as Core Graphics or, simply, CG.


http://developer.apple.com/mac/library/documentation/Graphic sImaging/Conceptual/drawingwithquartz2d/Introduction/Introdu ction.html

and: it's not to be mixed with QuickDraw API, which *is* deprecated, but quartz is a replacement for it.. cocoa partly uses it as far as i know, but mainly it uses opengl directly..

i have a test program here drawing stuff on screen with quartz, my chief bought a mac shortly, we are experimenting and really considering porting.

anyone with infos on it please post..
Re: Porting (Mac OS X) and "reference application" idea [message #28287 is a reply to message #28285] Thu, 26 August 2010 11:41 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i googled a bit..

http://www.iphonedevsdk.com/forum/iphone-sdk-development/352 9-best-api-2d-game.html

look for 'quartz' here
http://www.markj.net/iphone-development-programming-books/

http://developer.apple.com/technologies/mac/cocoa.html

http://stackoverflow.com/questions/1736583/quartz-2d-vs-open gl-es-learning-curve
states quartz is a 'c api'

http://my.safaribooksonline.com/0321336631/9#X2ludGVybmFsX0Z sYXNoUmVhZGVyP3htbGlkPTAzMjEzMzY2MzEvMTk=
has got some excerpt info on API parts

Quote:


Quartz 2D is a part of the Core Graphics system. It is a modern graphics library based on the imaging
model that Adobe created originally for PostScript printers and later as part of the PDF graphics file
format. This is the same imaging model that graphics professionals have used for several years to
create the artwork on everything from books and advertisements to application splash screens and
on-line games.
The Quartz 2D drawing model allows you to create sophisticated graphics with a simple API. The
Quartz 2D imaging model is quite different from the drawing models of other graphics libraries. Its
library can draw to many kinds of graphics devices while maximizing the fidelity of the graphics on
each device. As a result, developers familiar other graphics libraries such as QuickDraw, GDI from
Microsoft Windows, or the graphics portions of X1 1 ’s XLib face a learning curve when trying to work
with the device and resolution independent drawing model in Quartz 2D.




Quote:


The methods that you call on Core Graphics objects in Python take their names from the routines
in the C API that invoke the same behavior.



i conclude that Quartz itself is C API, with wrappers to several languages i.e objective c++, cocoa and carbon both use quartz for some parts. (carbin more than cocoa)

so a mac application would be a thin objective c++ application layer having almost all parts in c / c++
Re: Porting (Mac OS X) and "reference application" idea [message #28288 is a reply to message #28287] Thu, 26 August 2010 11:48 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
and some more

Quote:


The Quartz 2D C API

Quartz 2D is one part of a larger graphics environment known as Core Graphics. In addition to Quartz 2D, Core Graphics interacts with the window system and hardware to integrate graphics created by the many different graphics libraries on the system. It is responsible for managing the display environment and working with the window server and Quartz compositor to create the image presented on the screens. While Core Graphics encompasses more than Quartz 2D, it's not unusual for people to use the two terms interchangeably when discussing Quartz 2D in context.
The Core Graphics API is an object oriented API. To allow developers to use that API in as many environments as possible, however, the system implements it as a set of C routines. The API itself draws upon the object-oriented concepts of encapsulation, inheritance, and polymorphism. Because C doesn't directly support these concepts, Core Graphics uses opaque data types, in the place of classes, to support encapsulation and inheritance. To provide polymorphism, Core Graphics applies a naming convention to its routines.


http://flylib.com/books.php?ln=en&n=3&p=310&c=9& amp;p1=1&c1=1&c2=100&view=1
Re: Porting (Mac OS X) and "reference application" idea [message #28333 is a reply to message #9571] Sun, 29 August 2010 02:36 Go to previous messageGo to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
Is anyone working on an OS X port? OS X is a major platform now. When comparing U++ to QT and wxWidgets, lack of OS X support will be a negative toward U++.

Jeremy

[Updated on: Mon, 04 October 2010 04:41]

Report message to a moderator

Re: Porting (Mac OS X) and "reference application" idea [message #29738 is a reply to message #9571] Thu, 11 November 2010 11:56 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
I moved this topic here from "U++ developers corner" partly because:

luzr wrote on Thu, 17 May 2007 16:35

I have an idea how to speed-up the porting (MacOS X now, be it is general).

The most time consuming part of problem is to find out all the information about implementing required things on target platform,
[...]

Thoughts?

Mirek


And this topic contains some useful info. Maybe it would be a good idea to create a sticky topic containing a concentrated, most relevant objective-c++ snippets collection with info and links aka "U++ porting aqua resources"?

jeremy_c wrote on Sun, 29 August 2010 01:36

Is anyone working on an OS X port? [...]

Jeremy


Activity in this "Developing U++ » Mac OSX" category should reflect that.


Regarding "reference application". Maybe a good idea would be to start with upp SystemDraw (the first thing doesn't compile with Xcode) using Quartz/CoreGraphics CGContextRef (easier and gives clipping rectangles capabilities) or Cocoa NSGraphicsContext (need info about clipping rectangles...)?

P.S ConsoleDraw (Draw, Painter, PdfDraw ...) compiles with Xcode and works.
Re: Porting (Mac OS X) and "reference application" idea [message #29842 is a reply to message #29738] Sun, 21 November 2010 18:03 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fudadmin wrote on Thu, 11 November 2010 05:56


Regarding "reference application". Maybe a good idea would be to start with upp SystemDraw (the first thing doesn't compile with Xcode) using Quartz/CoreGraphics CGContextRef (easier and gives clipping rectangles capabilities) or Cocoa NSGraphicsContext (need info about clipping rectangles...)?



Definitely.

Quote:


P.S ConsoleDraw (Draw, Painter, PdfDraw ...) compiles with Xcode and works.


Well, good news there!

Mirek
Re: Porting (Mac OS X) and "reference application" idea [message #33060 is a reply to message #29842] Tue, 05 July 2011 16:41 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
seems as if Quartz 2D has similar drawing mechanisms like Upp. id defines a Drawing context, which finally is rasterized when the final resolution is available. so, porting *should* be generally not too complicated.
Re: Porting (Mac OS X) and "reference application" idea [message #33068 is a reply to message #33060] Tue, 05 July 2011 21:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 05 July 2011 10:41

seems as if Quartz 2D has similar drawing mechanisms like Upp. id defines a Drawing context, which finally is rasterized when the final resolution is available. so, porting *should* be generally not too complicated.


..besides, you only need to implement DrawRect, DrawText and DrawImage to run e.g. theide... Smile

Mirek
Re: Porting (Mac OS X) and "reference application" idea [message #33069 is a reply to message #33068] Tue, 05 July 2011 22:17 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Who,s willing to start the experiment? Imagine the kind of boost for ultimate beeing able to run natively on win32/posix/macos/sdl/framebuffer...

This can be a key feature especially for embedded systems, it,s quite hard to start with qt, fltk is outdated and pretty ugly, picogui has ceased devolpment, xserver or fbcon are complicated to implement in ES, and here comes upp, one tool for all the needs..even adaptable to a custom backend..

EDIT: this one is a central source..
http://developer.apple.com/library/mac/#documentation/Graphi csImaging/Conceptual/drawingwithquartz2d/Introduction/Introd uction.html

[Updated on: Wed, 06 July 2011 11:40]

Report message to a moderator

Re: Porting (Mac OS X) and "reference application" idea [message #33086 is a reply to message #33069] Wed, 06 July 2011 12:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 05 July 2011 16:17

Who,s willing to start the experiment?


Experiment? I guess we are past that now. Now we simply need to develop MacOS X backend.... Smile

Anyway, I hope somebody else than me will uptake the task.

Mirek
Re: Porting (Mac OS X) and "reference application" idea [message #33140 is a reply to message #33086] Mon, 11 July 2011 06:52 Go to previous messageGo to next message
daveremba is currently offline  daveremba
Messages: 32
Registered: June 2011
Location: Los Angeles, CA, USA
Member
Hi, I'm new to UPP, so I'll pose some
basic questions for discussion below.

I have some time and knowledge of the MacOS,
C++, etc. and would consider helping with
a more complete port of UPP to Mac.
It would help to get some direction/discussion
from the UPP community.
Also, are there any other developers on
MacOSX who would work on this??

What is the interest level in a MacOS port
of UPP?


I got a port working of TheIDE on MacOSX,
and the example apps run, but under an X11
emulator, and do not have the Apple look and feel.
This of course is expected.

There is some remaining work to fix a couple of
problems with buttons and menus. But in any
case this is a quick and crude port, and its main
value is that TheIDE itself does run and could
be used as an alternative to Xcode.

Xcode is the Apple equivalent of MS Visual Studio,
or KDevelop, etc. It generates code for MacOS,
iPhone, and iPad. It has a simulator for
the mobile devices (like Android).
One works mainly in Objective-C.

Xcode generates a .nib file, similar to the UPP
.layfile, form another tool called "Interface
Builder".

Attached are snapshots of the "widgets" available
in Xcode IB for iPhone and MacOSX.

Some questions to consider:

What kind of port would be reasonable and useful
to the UPP community?

Probably reinventing
the entire Apple tool chain is not desirable.

is there a 1:1 correspondence of widgets to UPP?
(probably not)

The UPP community would want an app that runs
on Linux and Windows to look similar, but also
conform to Apple look and feel, right?
(without much or any re-coding effort, like
Qt etc, but a better result than Qt)

There are several technical paths to chose from;
and picking the best one depends on what
the community expects from a porting effort
of UPP to Mac.

So a useful first step, I would ask readers to please
look at the attached widgets, and provide some
comments as to which ought to be connected to UPP
,
and which are "out of scope" (at least for a first
port). (widgets are in messages that follow)

There is at least a basic correspondence of
menus, buttons, tabs, etc. There are quite a
few button styles on MacOS however.
You can also
see some specialized containers that Apple provides
for OpenGL, Quicktime, PDF, and choosers for
time, date, options, etc. (particularly for
iPhone they look quite different from UPP).

I saw that another developer, Aris (fudadmin), did a port
of the vector and image drawing tools in UPP.
I downloaded that Xcode project also.


off-topic:
A universal mobile UI framework that claims 1 million
developers for mobile devices and that I'm working
with is Sencha, which runs in Javascript.

The libarary is called ExtJS. Here is the
link:
http://www.sencha.com/products/extjs/

Sencha currently lacks a good data-object
connection to server (Direct-EXT is incomplete).
I recommend UPP developers take a look at it,
how might it relate to the Rainbow (or future UPP)
projects?

For another project, I am considering using UPP for the
server backend (since it is so fast compared to PHP, and
a much better language (C++ & good design)
compared to PHP). I'd need JSON/REST in UPP
to get my project working however.

Any comments on this would be appreciated
(maybe in another thread).

Thanks,

Dave

Xcode Interface builder widgets (Cocoa library)
are attached as 4 replies to this post.

[Updated on: Mon, 11 July 2011 07:37]

Report message to a moderator

Re: Porting (Mac OS X) and "reference application" idea [message #33141 is a reply to message #33140] Mon, 11 July 2011 06:54 Go to previous messageGo to next message
daveremba is currently offline  daveremba
Messages: 32
Registered: June 2011
Location: Los Angeles, CA, USA
Member
screen 1

index.php?t=getfile&id=3367&private=0
Re: Porting (Mac OS X) and "reference application" idea [message #33142 is a reply to message #33141] Mon, 11 July 2011 06:56 Go to previous messageGo to previous message
daveremba is currently offline  daveremba
Messages: 32
Registered: June 2011
Location: Los Angeles, CA, USA
Member
screen 2

index.php?t=getfile&id=3368&private=0
Previous Topic: possibly working theide on Mac OS X using tiny mods to UNIX dist
Next Topic: Mac OS X backend development process
Goto Forum:
  


Current Time: Thu Mar 28 16:54:40 CET 2024

Total time taken to generate the page: 0.01937 seconds