API access

Discussion in 'Mac Programming' started by stece, Oct 27, 2008.

  1. stece Guest

    Joined:
    Oct 9, 2008
    #1
    Dear All

    Is there an interface for Mac OS X Leopard which allows a direct access to API. I know about Xcode but it gives only frameworks which are ready I say "boxed" classes. When I study Cocoa framework I feel as if being boxed by the ready made classes. Maybe I can't configure Xcode to use it on API level.
    I'd like to have access to structures and functions not of a framework but call directly API functions and structures. I'm looking for something like , I call, a platform. I know that I can ask for something that doesn't exist on Mac, but maybe it is possible to code on a lower level than Cocoa framework.
    Thank you in advance.
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Well the Cocoa frameworks are a set of APIs.

    I guess what you are looking for are things like the POSIX APIs and of course they are available. What languages do you want to use for the lower level stuff? C? C++? Assembler?
     
  3. stece thread starter Guest

    Joined:
    Oct 9, 2008
    #3
    Api

    I'd like to code in C. Maybe the problem is that I read too little about Cocoa, but it seemed to me that there are ready made classes which I won't be able change for the way I want to.
    I know that frameworks allow API access, but they make a certain must for a programmers not allowing to do certain thing. I had such a problem with Microsoft framework that's why I am careful in adopting Cocoa.
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    You are not making any sense. You seem to be misunderstanding a lot.

    A framework is just a collection of functions or classes. All programming is done using them, sometimes they are called libraries other times frameworks. It makes little difference as the end result is the same. They expose functions or classes that allow specific functionality in your application.

    If you do not want to use them your only other option is to rewrite that functionality yourself. Cocoa is primarily written in Objective-C if you want to program in C your best bet would be to look into Carbon. Although that looks like it is on its way out now.
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    You are making very little sense. API = Application Programming Interface. The Cocoa frameworks are an API. It makes no sense to ask if anything provides API access.

    If you want lower level control you are free to use Core Foundation and/or Carbon, although this is really not recommended. Having said that there is nothing that Cocoa prevents you doing that the OS in general doesn't prevent. Can you provide examples of what you want to do that you think Cocoa prevents you from doing?
     
  6. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #6
    You have direct access to the following APIs:

    1. The Standard C Library and the Standard C++ Library.
    2. The Posix API.
    3. The CoreFoundation API.
    4. The Carbon API
    5. The Cocoa API.

    (1) and (2) are about the lowest APIs that you could sensibly use. (3) contains a lot of useful code; lots if it is portable and available on non-Macintosh systems as well. If Cocoa is too far away from the actual machine for your liking, you may consider using Carbon.
     
  7. stece thread starter Guest

    Joined:
    Oct 9, 2008
    #7
    You are very right that I can misunderstand framework in FreeBSD sens. This is a little different technology than Microsoft's but the term framework is used by both companies. As you inform me that I can reprogram or change existing classes that's what I wanted, but I was afraid, that because there are classes so some methods can be declared as private excluding me possibilities to access and change those methods. I just don't know how Cocoa framework is organized, but it has a term of framework which means to me that there is a "frame" which I used to experience in my contacts with frameworks before.

    Thanks anyway. Future life will prove if I "butt against a frame".
     

Share This Page