TWAIN provides the legacy data source manager types and constants you use to acquire images from scanners and other imaging devices on macOS. You describe a session and its participants with structures such as TW_IDENTITY and TW_VERSION, negotiate device settings through TW_CAPABILITY, TW_ENUMERATION, TW_ONEVALUE, and TW_RANGE, and pump events with TW_EVENT while tracking outcomes via TW_STATUS. Image transfer and layout are modeled by types like TW_IMAGEINFO, TW_IMAGELAYOUT, TW_IMAGEMEMXFER, TW_SETUPMEMXFER, TW_SETUPFILEXFER, and TW_PENDINGXFERS, with color and tone handling expressed through TW_CIECOLOR, TW_RGBRESPONSE, TW_GRAYRESPONSE, and TW_PALETTE8.
Sessions and Identity 4
Structures that describe the data source manager, the applications and devices in a session, and their versions.
- StTW_IDENTITYA structure that identifies an application, a source, or the data source manager in a session.
- StTW_VERSIONA structure that identifies the version of an application, source, or the data source manager.
- StTW_USERINTERFACEA structure that controls whether and where a source displays its user interface.
- StTW_CALLBACKA structure that registers an application callback for asynchronous source notifications.
Events and Status 4
Structures for pumping window-system events and reporting the outcome of TWAIN operations.
- StTW_EVENTA structure that passes a window-system event to a source for processing.
- StTW_STATUSA structure that reports the condition code resulting from a TWAIN operation.
- StTW_DEVICEEVENTA structure that reports an asynchronous event originating from a device.
- StTW_INFOA structure that carries a single piece of attribute information in an extended query.
Capability Negotiation 6
Structures that carry capability values and the container formats used to negotiate device settings.
- StTW_CAPABILITYA structure that carries a capability and its negotiated container of values.
- StTW_CAPEXTA structure that carries extended capability negotiation information.
- StTW_ONEVALUEA capability container that holds a single value.
- StTW_ENUMERATIONA capability container that holds an enumerated list of allowed values.
- StTW_RANGEA capability container that describes a value range with minimum, maximum, and step.
- StTW_ARRAYA capability container that holds an array of values of a single type.
Image Information and Layout 4
Structures that describe acquired image attributes, framing, and extended per-image metadata.
- StTW_IMAGEINFOA structure that describes the attributes of an acquired image, such as resolution and pixel type.
- StTW_EXTIMAGEINFOA structure that returns extended, attribute-keyed information about an acquired image.
- StTW_IMAGELAYOUTA structure that describes the frame, document, and page position of an image.
- StTW_FRAMEA structure that defines a rectangular scan region using fixed-point coordinates.
Image Transfer 6
Structures that configure and track memory, file, and pending image transfers.
- StTW_IMAGEMEMXFERA structure that describes a buffer used during a buffered-memory image transfer.
- StTW_SETUPMEMXFERA structure that reports the buffer sizes required for a buffered-memory transfer.
- StTW_SETUPFILEXFERA structure that configures the file used for a file-based image transfer.
- StTW_SETUPFILEXFER2A structure that configures a file image transfer using a Unicode file path.
- StTW_PENDINGXFERSA structure that reports the number of images still pending transfer from a source.
- StTW_MEMORYA structure that describes a block of memory used to exchange data with a source.
Color and Tone 9
Structures that describe color spaces, palettes, and tonal response curves applied to acquired images.
- StTW_CIECOLORA structure that describes a CIE color space transformation for an image.
- StTW_CIEPOINTStructure Definitions *
- StTW_TRANSFORMSTAGEA structure that describes one stage of a CIE color transformation.
- StTW_DECODEFUNCTIONA structure that describes a decoding function used to convert color channel values.
- StTW_ELEMENT8A structure that holds an 8-bit palette entry with its index and color channel values.
- StTW_PALETTE8A structure that holds an 8-bit color or grayscale palette.
- StTW_RGBRESPONSEA structure that defines tonal response curves for the red, green, and blue channels.
- StTW_GRAYRESPONSEA structure that defines a tonal response curve for grayscale images.
- StTW_JPEGCOMPRESSIONA structure that describes the JPEG compression parameters applied to image data.
Audio Acquisition 2
Structures that describe and configure transfer of audio data from a source.
- StTW_AUDIOINFOA structure that describes the attributes of acquired audio data.
- StTW_SETUPAUDIOFILEXFERA structure that configures the file used for an audio file transfer.
Device Storage and Pass-Through 3
Structures for browsing source file systems, persisting custom data, and sending raw commands to a device.
- StTW_FILESYSTEMA structure that describes a file or directory in a source's file system.
- StTW_CUSTOMDSDATAA structure that holds opaque custom data a source persists on behalf of an application.
- StTW_PASSTHRUA structure that sends a raw command directly to a device and returns its response.
Legacy Thunking and Primitives 4
Fixed-point primitives and the legacy 16/32-bit thunking structures used by older data source bridges.
- StTW_FIX32A structure that represents a fixed-point number with separate whole and fractional parts.
- StTW_TWUNKIDENTITYA legacy thunking structure that identifies a participant across a 16/32-bit boundary.
- StTW_TWUNKDSENTRYPARAMSA legacy thunking structure that carries entry-point parameters across a 16/32-bit boundary.
- StTW_TWUNKDSENTRYRETURNA legacy thunking structure that carries entry-point return values across a 16/32-bit boundary.
Type Aliases 68
- TyTW_HANDLE
- TyTW_MEMREF
- TyTW_STR32
- TypTW_STR32
- TyTW_STR64
- TypTW_STR64
- TyTW_STR128
- TypTW_STR128
- TyTW_STR255
- TypTW_STR255
- TyTW_INT8
- TypTW_INT8
- TyTW_INT16
- TypTW_INT16
- TyTW_INT32
- TypTW_INT32
Show 52 more
- TyTW_UINT8
- TypTW_UINT8
- TyTW_UINT16
- TypTW_UINT16
- TyTW_UINT32
- TypTW_UINT32
- TyTW_BOOL
- TypTW_BOOL
- TypTW_FIX32
- TypTW_CIEPOINTStructure Definitions *
- TypTW_DECODEFUNCTION
- TypTW_ELEMENT8
- TypTW_FRAME
- TypTW_MEMORY
- TypTW_TRANSFORMSTAGE
- TypTW_VERSION
- TypTW_ARRAY
- TypTW_ENUMERATION
- TypTW_ONEVALUE
- TypTW_RANGE
- TypTW_CAPABILITY
- TypTW_CIECOLOR
- TypTW_EVENT
- TypTW_GRAYRESPONSE
- TypTW_IDENTITY
- TypTW_IMAGEINFO
- TypTW_IMAGELAYOUT
- TypTW_IMAGEMEMXFER
- TypTW_JPEGCOMPRESSION
- TypTW_PALETTE8
- TypTW_PENDINGXFERS
- TypTW_RGBRESPONSE
- TypTW_SETUPFILEXFER
- TypTW_SETUPFILEXFER2
- TypTW_SETUPMEMXFER
- TypTW_STATUS
- TypTW_USERINTERFACE
- TypTW_TWUNKIDENTITY
- TypTW_TWUNKDSENTRYPARAMS
- TypTW_TWUNKDSENTRYRETURN
- TypTW_CAPEXT
- TypTW_CUSTOMDSDATA
- TypTW_INFO
- TypTW_EXTIMAGEINFO
- TypTW_AUDIOINFO
- TypTW_DEVICEEVENT
- TypTW_FILESYSTEM
- TypTW_PASSTHRU
- TypTW_SETUPAUDIOFILEXFER
- TypTW_CALLBACK
- TyDSMENTRYPROC
- TyDSENTRYPROC