FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MacOS X Carbon Headers

 
Post new topic   Reply to topic     Forum Index -> CarbonHeaders
View previous topic :: View next topic  
Author Message
lws



Joined: 30 Jul 2005
Posts: 5

PostPosted: Sun Jul 31, 2005 1:20 pm    Post subject: MacOS X Carbon Headers Reply with quote

I, and a few other, mac developers think it would be easier if we could all work on adding Carbon library functions to some D imports. We would like to be able to have an SVN repository so that we can all update. That way as we need new functions, we can easily add them to the imports so others can use them. Eventually we might have something usable!

If we could use dsource.org as an svn repository for this relatively small project, that would be nice.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sun Jul 31, 2005 10:40 pm    Post subject: Re: MacOS X Carbon Headers Reply with quote

lws wrote:
I, and a few other, mac developers think it would be easier if we could all work on adding Carbon library functions to some D imports.

I'm guessing this was the group you were refering to: http://www.digitalmars.com/drn-bin/wwwnews?D.gnu/1394

Sounds like a good idea. I'm sure Brad will set you up when he gets a chance.
Back to top
View user's profile Send private message AIM Address
brad
Site Admin


Joined: 22 Feb 2004
Posts: 490
Location: Atlanta, GA USA

PostPosted: Mon Aug 01, 2005 7:32 am    Post subject: Reply with quote

Let me know what a project name and a short description would be and I'll get you set up.

BA
Back to top
View user's profile Send private message
lws



Joined: 30 Jul 2005
Posts: 5

PostPosted: Mon Aug 01, 2005 6:09 pm    Post subject: Reply with quote

Not sure about project name. I'd eventually hope this would be merged with phobos as: std.macosx.carbon (like std.windows)

How about CarbonHeaders?

Description:

This project aims at being a community effort to create function declarations for all of MacOS X's Carbon framework. If you decide to use these imports and find a function you want to use but isn't included, let us know.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
brad
Site Admin


Joined: 22 Feb 2004
Posts: 490
Location: Atlanta, GA USA

PostPosted: Tue Aug 02, 2005 10:33 pm    Post subject: Reply with quote

Keep cranking on your code. I will get this set up for you, but I'm not able to get any free time until the weekend... Sorry for the delay.

BA
Back to top
View user's profile Send private message
Eljay



Joined: 10 Sep 2005
Posts: 2
Location: Chanhassen, Minnesota

PostPosted: Sat Sep 10, 2005 1:26 pm    Post subject: Reply with quote

std.macosx.carbon

Sounds like a good project!

So far, I've just been adding functions and data structures as I've needed them to Anders carbon.d source. Which I used as a starting point & helped me start to learn D Programming Language.

Hmm, I think a thin OO veneer over Carbon in D would be useful. Diamond would be perfect name for such a thing. Nothing heavy weight (like Power Plant). Merely objectify Carbon API and convert OSStatus and OSErr result codes into exceptions. A project for another day.

--Eljay

PS: Thanks Anders both for carbon.d and for helping me get XCode 2.1 set up correctly to compile and link D source. Above and beyond the call!
Back to top
View user's profile Send private message
Eljay



Joined: 10 Sep 2005
Posts: 2
Location: Chanhassen, Minnesota

PostPosted: Sat Sep 10, 2005 1:35 pm    Post subject: Reply with quote

Here's a useful trick to make a file that encompasses all the headers brought in by carbon/carbon.h

echo '#include "carbon/carbon.h"' > view_carbon.cpp
(a one liner source file)

g++ -c -H view_carbon.cpp 2>all_carbon_headers

rm view_carbon.cpp view_carbon.o
(don't need these any more)

vi all_carbon_headers
(remove the leading '^[.]* ' via...
Confuseds/^[.]* //
)

sort -u all_carbon_headers -o all_carbon_headers
(more manageable size)

Now if you want to use it to search for, say, ConvertUTCToLocalDateTime ...

grep -w ConvertUTCToLocalDateTime $(<all_carbon_headers)

If there are too many headers (there aren't on my system), may have to do this...

xargs <all_carbon_headers grep -w ConvertUTCToLocalDateTime

Voila.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> CarbonHeaders All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group