Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Index of Basic Data Types

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Carbon
Mac Carbon  
Author Message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Wed Apr 04, 2007 3:35 pm    Post subject: Index of Basic Data Types Reply with quote

CarbonDev wiki: Carbon Headers

"The header files that expose the Carbon APIs contain a wealth of information
about Carbon, and are often more up to date than Apple's more official
developer documentation.

Some headers are so fundamental that all Carbon developers should take
the time to read them through - both for the content, and to familiarise yourself
with Carbon's overall structure."


Last edited by Ike on Fri Apr 20, 2007 1:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Apr 10, 2007 9:14 pm    Post subject: Reply with quote

#include <MacTypes.h>

Code:
typedef unsigned char   UInt8;
typedef signed char     SInt8;
typedef unsigned short  UInt16;
typedef signed short    SInt16;
typedef unsigned long   UInt32;
typedef signed long     SInt32;

typedef UInt32          ByteCount;

typedef UInt16          UniChar;
typedef UInt16          UTF16Char;

typedef UInt32          UniCharCount;


#include <MacErrors.h>

OSErr - Error Handler Reference

Code:
typedef SInt16 OSErr;


OSStatus - Error Handler Reference

Code:
typedef SInt32 OSStatus;


"If you want to use OSStatus to define error codes for your application, Apple
recommends that you use values in the range 1000 through 9999 inclusive.
Values outside of this range are reserved by Apple for internal use."


Last edited by delovski on Thu Apr 12, 2007 9:35 pm; edited 4 times in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Apr 10, 2007 9:45 pm    Post subject: Reply with quote

#include <CFBase.h>
#include <CFString.h>

CFStringRef - CFString Reference

Code:
typedef const struct __CFString *CFStringRef;


"Functions which accept CFStringRef values, and which need to hold on to
the values immutably, should call CFStringCreateCopy (instead of CFRetain)
to do so."
... // See: The Create Rule


CFMutableStringRef - CFMutableString Reference

Code:
typedef CFStringRef CFMutableStringRef;


"The type refers to a CFMutableString object, which encapsulates a Unicode
string along with its length; the object has the attribute of being mutable."


#include <Files.h>

HFSUniStr255 - File Manager Reference

Code:
struct HFSUniStr255 {
   UInt16 length;
   UniChar unicode[255];
};
typedef struct HFSUniStr255 HFSUniStr255;


"This data type is a string of up to 255 16-bit Unicode characters, with
a preceding 16-bit length."


Last edited by delovski on Fri Apr 20, 2007 1:34 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed Apr 11, 2007 5:36 pm    Post subject: Reply with quote

#include <Files.h>

FSRef - File Manager Reference
Code:
struct FSRef {
   UInt8 hidden[80];
};
typedef struct FSRef FSRef;
typedef FSRef * FSRefPtr;

Identifies a directory or file, including a volume’s root directory. This data
type’s purpose is similar to an FSSpec except that an FSRef is completely
opaque.


FSSpec - File Manager Reference
Code:
struct FSSpec {
   short vRefNum;
   long parID;
   StrFileName name;  // a Str63
};
typedef struct FSSpec FSSpec;
typedef FSSpec * FSSpecPtr;


Specifies the name and location of a file or directory. If you need to convert
a file specification into an FSSpec structure, call the function FSMakeFSSpec.
Do not fill in the fields of an FSSpec structure yourself.


To convert an FSSpec to an FSRef:
err = FSpMakeFSRef( &fsSpec, &fsRef );

To obtain an FSSpec from an FSRef:
err = FSGetCatalogInfo( &fsRef, kFSCatInfoNone, NULL, NULL, &fsSpec, NULL );

Non-Carbon applications can also specify a working directory reference
number in the vRefNum parameter. However, because working directories
are not supported in Carbon, you cannot specify a working directory reference
number if you wish your application to be Carbon-compatible.


Last edited by delovski on Sun May 06, 2007 1:21 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed Apr 11, 2007 5:38 pm    Post subject: Reply with quote

#include <Files.h>

FSCatalogInfo - File Manager Reference

Holds basic information about a file or directory.

Code:
struct FSCatalogInfo {
   UInt16 nodeFlags;
   FSVolumeRefNum volume;
   UInt32 parentDirID;
   UInt32 nodeID;
   UInt8 sharingFlags;
   UInt8 userPrivileges;
   UInt8 reserved1;
   UInt8 reserved2;
   UTCDateTime createDate;
   UTCDateTime contentModDate;
   UTCDateTime attributeModDate;
   UTCDateTime accessDate;
   UTCDateTime backupDate;
   UInt32 permissions[4];
   UInt8 finderInfo[16];
   UInt8 extFinderInfo[16];
   UInt64 dataLogicalSize;
   UInt64 dataPhysicalSize;
   UInt64 rsrcLogicalSize;
   UInt64 rsrcPhysicalSize;
   UInt32 valence;
   TextEncoding textEncodingHint;
};
typedef struct FSCatalogInfo FSCatalogInfo;
typedef FSCatalogInfo * FSCatalogInfoPtr;


The FSCatalogInfoBitmap type is used to indicate which fields of the
FSCatalogInfo should be set or retrieved.


Code:
typedef UInt32 FSCatalogInfoBitmap;


Last edited by delovski on Thu Apr 12, 2007 9:36 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Thu Apr 12, 2007 9:24 pm    Post subject: Reply with quote

#include <CFBundle.h>

CFBundleRef - CFBundle Reference

Code:
typedef struct __CFBundle * CFBundleRef;
typedef struct __CFBundle * CFPlugInRef;


"CFBundle allows you to use a folder hierarchy called a bundle to organize
and locate many types of application resources including images, sounds,
localized strings, and executable code. In Mac OS X, bundles can also be
used by CFM applications to load and execute functions from Mach-O
frameworks. You can use bundles to support multiple languages or execute
your application on multiple operating environments."

See also: CFPlugIn Reference & Darwin/CFBundle.c


Last edited by delovski on Sat Apr 14, 2007 5:29 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Apr 14, 2007 5:27 pm    Post subject: Reply with quote

#include <CFBase.h>

CFIndex - Base Utilities Reference

Code:
typedef SInt32 CFIndex;


"On architectures where pointer sizes are a different size (say, 64 bits)
CFIndex might be declared to be also 64 bits, independent of the size of
int."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Apr 14, 2007 5:33 pm    Post subject: Reply with quote

#include <CFURL.h>

CFURLRef - CFURL Reference

Code:
typedef const struct __CFURL *CFURLRef;

"A CFURL object is composed of two parts—a base URL, which can be NULL,
and a string that is resolved relative to the base URL. A CFURL object whose
string is fully resolved without a base URL is considered absolute; all others
are considered relative."



#include <IBCarbonRuntime.h>

IBNibRef - Interface Builder Services Reference

Code:
typedef struct OpaqueIBNibRef * IBNibRef;

"A reference to a nib file. Use this reference with functions to unarchive
interface objects you create using Interface Builder."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Apr 14, 2007 6:56 pm    Post subject: Reply with quote

#include <CarbonEventsCore.h>
#include <CarbonEvents.h>

"The Carbon Event Manager is the preferred API for handling events in
Carbon applications. You can use this interface to handle events generated
in response to user input as well as to create your own custom events.
Because event handling is so fundamental to all applications, this document
is relevant for everyone writing Carbon applications.

For more information about HIObjects and the HIView subclass, see HIView
Programming Guide
."


EventRef - Carbon Event Manager Reference

Code:
typedef struct OpaqueEventRef * EventRef;

"Represents an opaque data structure that identifies individual events."


EventTypeSpec - Carbon Event Manager Reference

Code:
struct EventTypeSpec {
   UInt32 eventClass;
   UInt32 eventKind;
};
typedef struct EventTypeSpec EventTypeSpec;


"This structure is used to specify an event. Typically, you pass a static
array of EventTypeSpec structures into functions such as InstallEventHandler."


EventHandlerCallRef - Carbon Event Manager Reference

Code:
typedef struct OpaqueEventHandlerCallRef * EventHandlerCallRef;

"This structure is passed to your event handler, which can then choose to
pass control to the next handler in the calling hierarchy (such as a standard
event handler). Doing so is a convenient way to add pre- or post-processing
to the standard event handler. See the CallNextEventHandler function for
more information."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Apr 14, 2007 7:21 pm    Post subject: Reply with quote

#include <AppleEvents.h>

AEDesc - Apple Event Manager Reference

Code:
struct AEDesc {
   DescType descriptorType;
   AEDataStorage dataHandle;
};
typedef struct AEDesc AEDesc;


"The descriptor type is a structure of type DescType, which in turn is of
data type ResType—that is, a four-character code. Descriptor Type
Constants
lists the constants for the basic descriptor types used by
the Apple Event Manager. For information about descriptor types used
with object specifiers, see Key Form and Descriptor Type Object
Specifier Constants
."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Apr 15, 2007 5:18 pm    Post subject: Reply with quote

#include <Quickdraw.h>

CGrafPtr - QuickDraw Reference

Code:
typedef GrafPtr CGrafPtr;

typedef struct OpaqueGrafPtr * GrafPtr;

"QuickDraw has been deprecated for deployment targets Mac OS X
version 10.4 and later. The replacement API is Quartz 2D."



Rect - QuickTime Data Types Reference(!?!)

Code:
struct Rect {
   short    top;
   short    left;
   short    bottom;
   short    right;
};

"Defines the size and location of a QuickDraw rectangle."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Apr 15, 2007 11:58 pm    Post subject: Reply with quote

#include <MacWindows.h>

WindowRef - Window Manager Reference

Code:
typedef WindowPtr WindowRef;

typedef struct OpaqueWindowPtr * WindowPtr;


"You must revise your application so that it accesses Window Manager data
structures only through accessor functions."


"Historically, the Window Manager has offered different successive methods
for creating and manipulating windows.Window Manager Legacy Reference
describes those older APIs that are not recommended or are unsupported.
For the most up-to-date information about creating windows, see the docu-
ment Handling Carbon Windows and Controls."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Mon Apr 16, 2007 12:56 pm    Post subject: Reply with quote

#include <Controls.h>

ControlRef - Control Manager Reference

Code:
typedef struct OpaqueControlRef * ControlRef;


"In Mac OS X v10.2 and later, Control Manager controls may be implemented
as HIViews. View-based controls offer additional flexibility and extensibility for
developers. For more information see the document HIView Programming
Guide
in Carbon User Experience Documentation."


ControlID - Control Manager Reference

Code:
struct ControlID {
   OSType signature;
   SInt32 id;
};
typedef struct ControlID ControlID;
typedef ControlID HIViewID;


ControlFontStyleRec - Control Manager Reference

Code:
struct ControlFontStyleRec {
   SInt16 flags;
   SInt16 font;
   SInt16 size;
   SInt16 style;
   SInt16 mode;
   SInt16 just;
   RGBColor foreColor;
   RGBColor backColor;
};
typedef struct ControlFontStyleRec ControlFontStyleRec;
typedef ControlFontStyleRec * ControlFontStylePtr;


"You pass a pointer to the control font style structure in the inStyle parameter
of SetControlFontStyle to specify a control’s font. If none of the flags in the
flags field of the structure are set, the control uses the system font unless
the control variant kControlUsesOwningWindowsFontVariant has been specified,
in which case the control uses the window font."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Mon Apr 16, 2007 2:04 pm    Post subject: Reply with quote

#include <CarbonEventsCore.h>
#include <CarbonEvents.h>

HICommand - Carbon Event Manager Reference

Code:
struct HICommand {
   UInt32 attributes
   UInt32 commandID
   struct {
      MenuRef menuRef;
      MenuItemIndex menuItemIndex;
   } menu;
};
typedef struct HICommand HICommand;

"Represents a command event; this structure has been superseded by
the HICommandExtended structure."


HICommandExtended - Carbon Event Manager Reference

Code:
struct HICommandExtended {
   UInt32 attributes;
   UInt32 commandID;
   union {
      controlRef control;
      windowRef window;
      struct {
         MenuRef menuRef;
         MenuItemIndex menuItemIndex;
      } menu;
   } source;
};
typedef struct HICommandExtended HICommandExtended;


"The HICommandExtended structure was introduced in Mac OS X v10.2
and CarbonLib 1.6. Because the HICommand and HICommandExtended
structures are exactly the same size and have the same fields at the same
offsets, you can use an HICommandExtended structure at runtime while
running on any version of CarbonLib or Mac OS X.

The only difference is that the HICommandExtended structure has a union
that allows you to get type-safe access to the source object. The originator
of the command determines whether the structure actually contains a
ControlRef, WindowRef, MenuRef, or nothing at all."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Apr 16, 2007 4:54 pm    Post subject: Reply with quote

#include <Navigation.h>

NavDialogRef - Navigation Services Reference

Code:
typedef struct __NavDialog * NavDialogRef;

"Your application obtains a NavDialogRef by calling one of the dialog creation
functions described in Choosing Files, Folders and Volumes and Saving
Files
. When you are completely finished using the reference, dispose of it
by calling the function NavDialogDispose."


NavDialogCreationOptions - Navigation Services Reference

Code:
struct NavDialogCreationOptions {
   UInt16 version;
   NavDialogOptionFlags optionFlags;
   Point location;
   CFStringRef clientName;
   CFStringRef windowTitle;
   CFStringRef actionButtonLabel;
   CFStringRef cancelButtonLabel;
   CFStringRef saveFileName;
   CFStringRef message;
   UInt32 preferenceKey;
   CFArrayRef popupExtension;
   WindowModality modality;
   WindowRef parentWindow;
   char reserved[16];
};
typedef struct NavDialogCreationOptions NavDialogCreationOptions;


NavTypeList - Navigation Services Reference

Code:
struct NavTypeList {
   OSType componentSignature;
   short reserved;
   short osTypeCount;
   OSType osType[1];
};
typedef struct NavTypeList NavTypeList;

"Your application uses the NavTypeList structure to define a list of file types
that your application is capable of opening. You may create this list dynamically
or reference a Translation Manager 'open' resource. For more information
on the 'open' resource and the Translation Manager, see the Translation
Manager
chapter in Inside Macintosh: More Macintosh Toolbox."


Last edited by delovski on Mon Apr 16, 2007 5:13 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Apr 16, 2007 5:11 pm    Post subject: Reply with quote

#include <Navigation.h>

NavCBRec - Navigation Services Reference

Code:
struct NavCBRec {
   UInt16 version;
   NavDialogRef context;
   WindowRef window;
   Rect customRect;
   Rect previewRect;
   NavEventData eventData;
   NavUserAction userAction;
   char reserved[218];
};
typedef struct NavCBRec NavCBRec;
typedef NavCBRec  *NavCBRecPtr;

"Provides information you can use for event-handling and customization."

NavReplyRecord - Navigation Services Reference

Code:
struct NavReplyRecord {
   UInt16 version;
   Boolean validRecord;
   Boolean replacing;
   Boolean isStationery;
   Boolean translationNeeded;
   AEDescList selection;
   ScriptCode keyScript;
   FileTranslationSpecArrayHandle fileTranslation;
   UInt32 reserved1;
   CFStringRef saveFileName;
   Boolean saveFileExtensionHidden;
   UInt8 reserved2;
   char reserved[225];
};
typedef struct NavReplyRecord NavReplyRecord;

"When your application is through using the structure, remember to dispose
of it by calling the function NavDisposeReply."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Apr 16, 2007 5:36 pm    Post subject: Reply with quote

#include <Navigation.h>

NavEventCallbackMessage - Navigation Services Reference

Code:
typedef SInt32 NavEventCallbackMessage;

enum {
   kNavCBEvent = 0,
   kNavCBCustomize = 1,
   kNavCBStart = 2,
   kNavCBTerminate = 3,
   kNavCBAdjustRect = 4,
   kNavCBNewLocation = 5,
   kNavCBShowDesktop = 6,
   kNavCBSelectEntry = 7,
   kNavCBPopupMenuSelect = 8,
   kNavCBAccept = 9,
   kNavCBCancel = 10,
   kNavCBAdjustPreview = 11,
   kNavCBUserAction = 12,
   kNavCBOpenSelection = (long)x80000000
};

"Define messages sent to your event-handling function."

NavEventUPP - Navigation Services Reference

Code:

typedef NavEventProcPtr NavEventUPP;

typedef void (*NavEventProcPtr) (NavEventCallbackMessage cbSelector, NavCBRecPtr cbParms, void *cbUD);

"Defines a universal procedure pointer (UPP) to an application-defined
event–handling function."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri Apr 20, 2007 1:26 pm    Post subject: Reply with quote

#include <PMCore.h>
#include <PMApplication.h>
#include <PMDefinitions.h>

PMPrintSession - Carbon Printing Manager Reference

Code:
typedef struct OpaquePMPrintSession* PMPrintSession;

"A printing session object contains information that’s needed by the page format
and print settings objects, such as default page format and print settings values.
For this reason, some Carbon Printing Manager functions can be called only
after you have created a printing session object."



PMPageFormat - Carbon Printing Manager Reference

Code:
typedef struct OpaquePMPageFormat* PMPageFormat;

"Your application uses page format objects to store information such as
the paper size, orientation, and scale of pages in a printing session."


PMPrintSettings - Carbon Printing Manager Reference

Code:
typedef struct OpaquePMPrintSettings* PMPrintSettings;

"Your application uses print settings objects to store information such as
the number of copies and the range of pages to print in a printing session."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Carbon All times are GMT + 1 Hour
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


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group