Mac OS 9
PictUtils.h File Reference

Picture Utilities Interfaces. More...

#include <MacTypes.h>
#include <Palettes.h>

Go to the source code of this file.

Data Structures

struct  CommentSpec
 
struct  FontSpec
 
struct  PictInfo
 

Macros

#define NewInitPickMethodUPP(userRoutine)
 
#define NewRecordColorsUPP(userRoutine)
 
#define NewCalcColorTableUPP(userRoutine)
 
#define NewDisposeColorPickMethodUPP(userRoutine)
 
#define DisposeInitPickMethodUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeRecordColorsUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeCalcColorTableUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeDisposeColorPickMethodUPP(userUPP)    DisposeRoutineDescriptor(userUPP)
 
#define InvokeInitPickMethodUPP(colorsRequested, dataRef, colorBankType, userUPP)
 
#define InvokeRecordColorsUPP(dataRef, colorsArray, colorCount, uniqueColors, userUPP)
 
#define InvokeCalcColorTableUPP(dataRef, colorsRequested, colorBankPtr, resultPtr, userUPP)
 
#define InvokeDisposeColorPickMethodUPP(dataRef, userUPP)
 
#define NewInitPickMethodProc(userRoutine)   NewInitPickMethodUPP(userRoutine)
 
#define NewRecordColorsProc(userRoutine)   NewRecordColorsUPP(userRoutine)
 
#define NewCalcColorTableProc(userRoutine)   NewCalcColorTableUPP(userRoutine)
 
#define NewDisposeColorPickMethodProc(userRoutine)    NewDisposeColorPickMethodUPP(userRoutine)
 
#define CallInitPickMethodProc(userRoutine, colorsRequested, dataRef, colorBankType)    InvokeInitPickMethodUPP(colorsRequested, dataRef, colorBankType, userRoutine)
 
#define CallRecordColorsProc(userRoutine, dataRef, colorsArray, colorCount, uniqueColors)
 
#define CallCalcColorTableProc(userRoutine, dataRef, colorsRequested, colorBankPtr, resultPtr)
 
#define CallDisposeColorPickMethodProc(userRoutine, dataRef)    InvokeDisposeColorPickMethodUPP(dataRef, userRoutine)
 

Typedefs

typedef long PictInfoID
 
typedef struct CommentSpec CommentSpec
 
typedef CommentSpecCommentSpecPtr
 
typedef CommentSpecPtrCommentSpecHandle
 
typedef struct FontSpec FontSpec
 
typedef FontSpecFontSpecPtr
 
typedef FontSpecPtrFontSpecHandle
 
typedef struct PictInfo PictInfo
 
typedef PictInfoPictInfoPtr
 
typedef PictInfoPtrPictInfoHandle
 
typedef UInt32 * dataRef
 
typedef UInt32 SInt16 * colorBankType
 
typedef RGBColorcolorsArray
 
typedef RGBColor SInt32 colorCount
 
typedef RGBColor SInt32 SInt32 * uniqueColors
 
typedef SInt16 colorsRequested
 
typedef SInt16 void * colorBankPtr
 
typedef SInt16 void CSpecArray resultPtr
 

Enumerations

enum  {
  returnColorTable = 0x0001 , returnPalette = 0x0002 , recordComments = 0x0004 , recordFontInfo = 0x0008 ,
  suppressBlackAndWhite = 0x0010
}
 
enum  { systemMethod = 0 , popularMethod = 1 , medianMethod = 2 }
 
enum  { ColorBankIsCustom = -1 , ColorBankIsExactAnd555 = 0 , ColorBankIs555 = 1 }
 
enum  { uppInitPickMethodProcInfo = 0x00000FA0 }
 
enum  { uppRecordColorsProcInfo = 0x00003FE0 }
 
enum  { uppCalcColorTableProcInfo = 0x00003EE0 }
 
enum  { uppDisposeColorPickMethodProcInfo = 0x000000E0 }
 

Functions

typedef CALLBACK_API (OSErr, InitPickMethodProcPtr)(SInt16 colorsRequested
 
typedef CALLBACK_API (OSErr, RecordColorsProcPtr)(UInt32 dataRef
 
typedef CALLBACK_API (OSErr, CalcColorTableProcPtr)(UInt32 dataRef
 
typedef CALLBACK_API (OSErr, DisposeColorPickMethodProcPtr)(UInt32 dataRef)
 
typedef STACK_UPP_TYPE (InitPickMethodProcPtr) InitPickMethodUPP
 
typedef STACK_UPP_TYPE (RecordColorsProcPtr) RecordColorsUPP
 
typedef STACK_UPP_TYPE (CalcColorTableProcPtr) CalcColorTableUPP
 
typedef STACK_UPP_TYPE (DisposeColorPickMethodProcPtr) DisposeColorPickMethodUPP
 
InitPickMethodUPP NewInitPickMethodUPP (InitPickMethodProcPtr userRoutine)
 
RecordColorsUPP NewRecordColorsUPP (RecordColorsProcPtr userRoutine)
 
CalcColorTableUPP NewCalcColorTableUPP (CalcColorTableProcPtr userRoutine)
 
DisposeColorPickMethodUPP NewDisposeColorPickMethodUPP (DisposeColorPickMethodProcPtr userRoutine)
 
void DisposeInitPickMethodUPP (InitPickMethodUPP userUPP)
 
void DisposeRecordColorsUPP (RecordColorsUPP userUPP)
 
void DisposeCalcColorTableUPP (CalcColorTableUPP userUPP)
 
void DisposeDisposeColorPickMethodUPP (DisposeColorPickMethodUPP userUPP)
 
OSErr InvokeInitPickMethodUPP (SInt16 colorsRequested, UInt32 *dataRef, SInt16 *colorBankType, InitPickMethodUPP userUPP)
 
OSErr InvokeRecordColorsUPP (UInt32 dataRef, RGBColor *colorsArray, SInt32 colorCount, SInt32 *uniqueColors, RecordColorsUPP userUPP)
 
OSErr InvokeCalcColorTableUPP (UInt32 dataRef, SInt16 colorsRequested, void *colorBankPtr, CSpecArray resultPtr, CalcColorTableUPP userUPP)
 
OSErr InvokeDisposeColorPickMethodUPP (UInt32 dataRef, DisposeColorPickMethodUPP userUPP)
 
OSErr GetPictInfo (PicHandle thePictHandle, PictInfo *thePictInfo, short verb, short colorsRequested, short colorPickMethod, short version)
 
OSErr GetPixMapInfo (PixMapHandle thePixMapHandle, PictInfo *thePictInfo, short verb, short colorsRequested, short colorPickMethod, short version)
 
OSErr NewPictInfo (PictInfoID *thePictInfoID, short verb, short colorsRequested, short colorPickMethod, short version)
 
OSErr RecordPictInfo (PictInfoID thePictInfoID, PicHandle thePictHandle)
 
OSErr RecordPixMapInfo (PictInfoID thePictInfoID, PixMapHandle thePixMapHandle)
 
OSErr RetrievePictInfo (PictInfoID thePictInfoID, PictInfo *thePictInfo, short colorsRequested)
 
OSErr DisposePictInfo (PictInfoID thePictInfoID)
 

Detailed Description

Picture Utilities Interfaces.

Introduced In: Mac OS 8.5
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1990-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ CallCalcColorTableProc

#define CallCalcColorTableProc (   userRoutine,
  dataRef,
  colorsRequested,
  colorBankPtr,
  resultPtr 
)
Value:
InvokeCalcColorTableUPP(dataRef, colorsRequested, colorBankPtr, resultPtr, \
userRoutine)
OSErr InvokeCalcColorTableUPP(UInt32 dataRef, SInt16 colorsRequested, void *colorBankPtr, CSpecArray resultPtr, CalcColorTableUPP userUPP)

◆ CallRecordColorsProc

#define CallRecordColorsProc (   userRoutine,
  dataRef,
  colorsArray,
  colorCount,
  uniqueColors 
)
Value:
InvokeRecordColorsUPP(dataRef, colorsArray, colorCount, uniqueColors, \
userRoutine)
OSErr InvokeRecordColorsUPP(UInt32 dataRef, RGBColor *colorsArray, SInt32 colorCount, SInt32 *uniqueColors, RecordColorsUPP userUPP)
Definition: Quickdraw.h:1710

◆ InvokeCalcColorTableUPP

#define InvokeCalcColorTableUPP (   dataRef,
  colorsRequested,
  colorBankPtr,
  resultPtr,
  userUPP 
)
Value:
(OSErr) \
CALL_FOUR_PARAMETER_UPP((userUPP), uppCalcColorTableProcInfo, (dataRef), \
(colorsRequested), (colorBankPtr), (resultPtr))

◆ InvokeDisposeColorPickMethodUPP

#define InvokeDisposeColorPickMethodUPP (   dataRef,
  userUPP 
)
Value:
(OSErr) CALL_ONE_PARAMETER_UPP((userUPP), uppDisposeColorPickMethodProcInfo, \
(dataRef))

◆ InvokeInitPickMethodUPP

#define InvokeInitPickMethodUPP (   colorsRequested,
  dataRef,
  colorBankType,
  userUPP 
)
Value:
(OSErr) \
CALL_THREE_PARAMETER_UPP((userUPP), uppInitPickMethodProcInfo, \
(colorsRequested), (dataRef), (colorBankType))

◆ InvokeRecordColorsUPP

#define InvokeRecordColorsUPP (   dataRef,
  colorsArray,
  colorCount,
  uniqueColors,
  userUPP 
)
Value:
(OSErr) \
CALL_FOUR_PARAMETER_UPP((userUPP), uppRecordColorsProcInfo, (dataRef), \
(colorsArray), (colorCount), (uniqueColors))

◆ NewCalcColorTableUPP

#define NewCalcColorTableUPP (   userRoutine)
Value:
(CalcColorTableUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalcColorTableProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

pascal 2_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes)

◆ NewDisposeColorPickMethodUPP

#define NewDisposeColorPickMethodUPP (   userRoutine)
Value:
(DisposeColorPickMethodUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppDisposeColorPickMethodProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes)

◆ NewInitPickMethodProc

#define NewInitPickMethodProc (   userRoutine)    NewInitPickMethodUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewInitPickMethodUPP

#define NewInitPickMethodUPP (   userRoutine)
Value:
(InitPickMethodUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppInitPickMethodProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes)

◆ NewRecordColorsUPP

#define NewRecordColorsUPP (   userRoutine)
Value:
(RecordColorsUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppRecordColorsProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

verbs for the GetPictInfo, GetPixMapInfo, and NewPictInfo calls

◆ anonymous enum

anonymous enum
Enumerator
systemMethod 

color pick methods

popularMethod 

system color pick method

medianMethod 

method that chooses the most popular set of colors

◆ anonymous enum

anonymous enum
Enumerator
ColorBankIsCustom 

color bank types

Function Documentation

◆ DisposeCalcColorTableUPP()

void DisposeCalcColorTableUPP ( CalcColorTableUPP  userUPP)

DisposeCalcColorTableUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDisposeColorPickMethodUPP()

void DisposeDisposeColorPickMethodUPP ( DisposeColorPickMethodUPP  userUPP)

DisposeDisposeColorPickMethodUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeInitPickMethodUPP()

void DisposeInitPickMethodUPP ( InitPickMethodUPP  userUPP)

DisposeInitPickMethodUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposePictInfo()

OSErr DisposePictInfo ( PictInfoID  thePictInfoID)

DisposePictInfo()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeRecordColorsUPP()

void DisposeRecordColorsUPP ( RecordColorsUPP  userUPP)

DisposeRecordColorsUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPictInfo()

OSErr GetPictInfo ( PicHandle  thePictHandle,
PictInfo thePictInfo,
short  verb,
short  colorsRequested,
short  colorPickMethod,
short  version 
)

CALL_NOT_IN_CARBON GetPictInfo()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPixMapInfo()

OSErr GetPixMapInfo ( PixMapHandle  thePixMapHandle,
PictInfo thePictInfo,
short  verb,
short  colorsRequested,
short  colorPickMethod,
short  version 
)

GetPixMapInfo()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeCalcColorTableUPP()

OSErr InvokeCalcColorTableUPP ( UInt32  dataRef,
SInt16  colorsRequested,
void *  colorBankPtr,
CSpecArray  resultPtr,
CalcColorTableUPP  userUPP 
)

InvokeCalcColorTableUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDisposeColorPickMethodUPP()

OSErr InvokeDisposeColorPickMethodUPP ( UInt32  dataRef,
DisposeColorPickMethodUPP  userUPP 
)

InvokeDisposeColorPickMethodUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeInitPickMethodUPP()

OSErr InvokeInitPickMethodUPP ( SInt16  colorsRequested,
UInt32 *  dataRef,
SInt16 *  colorBankType,
InitPickMethodUPP  userUPP 
)

InvokeInitPickMethodUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeRecordColorsUPP()

OSErr InvokeRecordColorsUPP ( UInt32  dataRef,
RGBColor colorsArray,
SInt32  colorCount,
SInt32 *  uniqueColors,
RecordColorsUPP  userUPP 
)

InvokeRecordColorsUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewCalcColorTableUPP()

CalcColorTableUPP NewCalcColorTableUPP ( CalcColorTableProcPtr  userRoutine)

NewCalcColorTableUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDisposeColorPickMethodUPP()

DisposeColorPickMethodUPP NewDisposeColorPickMethodUPP ( DisposeColorPickMethodProcPtr  userRoutine)

NewDisposeColorPickMethodUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewInitPickMethodUPP()

InitPickMethodUPP NewInitPickMethodUPP ( InitPickMethodProcPtr  userRoutine)

NewInitPickMethodUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewPictInfo()

OSErr NewPictInfo ( PictInfoID *  thePictInfoID,
short  verb,
short  colorsRequested,
short  colorPickMethod,
short  version 
)

NewPictInfo()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewRecordColorsUPP()

RecordColorsUPP NewRecordColorsUPP ( RecordColorsProcPtr  userRoutine)

NewRecordColorsUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RecordPictInfo()

OSErr RecordPictInfo ( PictInfoID  thePictInfoID,
PicHandle  thePictHandle 
)

RecordPictInfo()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RecordPixMapInfo()

OSErr RecordPixMapInfo ( PictInfoID  thePictInfoID,
PixMapHandle  thePixMapHandle 
)

RecordPixMapInfo()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RetrievePictInfo()

OSErr RetrievePictInfo ( PictInfoID  thePictInfoID,
PictInfo thePictInfo,
short  colorsRequested 
)

RetrievePictInfo()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later