TechnologiesLow-level, Kernel & Legacy

TWAIN

iOSmacOStvOSwatchOSvisionOS

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.

  • St
    TW_IDENTITY
    A structure that identifies an application, a source, or the data source manager in a session.
  • St
    TW_VERSION
    A structure that identifies the version of an application, source, or the data source manager.
  • St
    TW_USERINTERFACE
    A structure that controls whether and where a source displays its user interface.
  • St
    TW_CALLBACK
    A 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.

  • St
    TW_EVENT
    A structure that passes a window-system event to a source for processing.
  • St
    TW_STATUS
    A structure that reports the condition code resulting from a TWAIN operation.
  • St
    TW_DEVICEEVENT
    A structure that reports an asynchronous event originating from a device.
  • St
    TW_INFO
    A 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.

  • St
    TW_CAPABILITY
    A structure that carries a capability and its negotiated container of values.
  • St
    TW_CAPEXT
    A structure that carries extended capability negotiation information.
  • St
    TW_ONEVALUE
    A capability container that holds a single value.
  • St
    TW_ENUMERATION
    A capability container that holds an enumerated list of allowed values.
  • St
    TW_RANGE
    A capability container that describes a value range with minimum, maximum, and step.
  • St
    TW_ARRAY
    A 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.

  • St
    TW_IMAGEINFO
    A structure that describes the attributes of an acquired image, such as resolution and pixel type.
  • St
    TW_EXTIMAGEINFO
    A structure that returns extended, attribute-keyed information about an acquired image.
  • St
    TW_IMAGELAYOUT
    A structure that describes the frame, document, and page position of an image.
  • St
    TW_FRAME
    A 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.

  • St
    TW_IMAGEMEMXFER
    A structure that describes a buffer used during a buffered-memory image transfer.
  • St
    TW_SETUPMEMXFER
    A structure that reports the buffer sizes required for a buffered-memory transfer.
  • St
    TW_SETUPFILEXFER
    A structure that configures the file used for a file-based image transfer.
  • St
    TW_SETUPFILEXFER2
    A structure that configures a file image transfer using a Unicode file path.
  • St
    TW_PENDINGXFERS
    A structure that reports the number of images still pending transfer from a source.
  • St
    TW_MEMORY
    A 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.

  • St
    TW_CIECOLOR
    A structure that describes a CIE color space transformation for an image.
  • St
    TW_CIEPOINT
    Structure Definitions *
  • St
    TW_TRANSFORMSTAGE
    A structure that describes one stage of a CIE color transformation.
  • St
    TW_DECODEFUNCTION
    A structure that describes a decoding function used to convert color channel values.
  • St
    TW_ELEMENT8
    A structure that holds an 8-bit palette entry with its index and color channel values.
  • St
    TW_PALETTE8
    A structure that holds an 8-bit color or grayscale palette.
  • St
    TW_RGBRESPONSE
    A structure that defines tonal response curves for the red, green, and blue channels.
  • St
    TW_GRAYRESPONSE
    A structure that defines a tonal response curve for grayscale images.
  • St
    TW_JPEGCOMPRESSION
    A 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.

  • St
    TW_AUDIOINFO
    A structure that describes the attributes of acquired audio data.
  • St
    TW_SETUPAUDIOFILEXFER
    A 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.

  • St
    TW_FILESYSTEM
    A structure that describes a file or directory in a source's file system.
  • St
    TW_CUSTOMDSDATA
    A structure that holds opaque custom data a source persists on behalf of an application.
  • St
    TW_PASSTHRU
    A 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.

  • St
    TW_FIX32
    A structure that represents a fixed-point number with separate whole and fractional parts.
  • St
    TW_TWUNKIDENTITY
    A legacy thunking structure that identifies a participant across a 16/32-bit boundary.
  • St
    TW_TWUNKDSENTRYPARAMS
    A legacy thunking structure that carries entry-point parameters across a 16/32-bit boundary.
  • St
    TW_TWUNKDSENTRYRETURN
    A legacy thunking structure that carries entry-point return values across a 16/32-bit boundary.

Type Aliases 68

  • Ty
    TW_HANDLE
  • Ty
    TW_MEMREF
  • Ty
    TW_STR32
  • Ty
    pTW_STR32
  • Ty
    TW_STR64
  • Ty
    pTW_STR64
  • Ty
    TW_STR128
  • Ty
    pTW_STR128
  • Ty
    TW_STR255
  • Ty
    pTW_STR255
  • Ty
    TW_INT8
  • Ty
    pTW_INT8
  • Ty
    TW_INT16
  • Ty
    pTW_INT16
  • Ty
    TW_INT32
  • Ty
    pTW_INT32
Show 52 more
  • Ty
    TW_UINT8
  • Ty
    pTW_UINT8
  • Ty
    TW_UINT16
  • Ty
    pTW_UINT16
  • Ty
    TW_UINT32
  • Ty
    pTW_UINT32
  • Ty
    TW_BOOL
  • Ty
    pTW_BOOL
  • Ty
    pTW_FIX32
  • Ty
    pTW_CIEPOINT
    Structure Definitions *
  • Ty
    pTW_DECODEFUNCTION
  • Ty
    pTW_ELEMENT8
  • Ty
    pTW_FRAME
  • Ty
    pTW_MEMORY
  • Ty
    pTW_TRANSFORMSTAGE
  • Ty
    pTW_VERSION
  • Ty
    pTW_ARRAY
  • Ty
    pTW_ENUMERATION
  • Ty
    pTW_ONEVALUE
  • Ty
    pTW_RANGE
  • Ty
    pTW_CAPABILITY
  • Ty
    pTW_CIECOLOR
  • Ty
    pTW_EVENT
  • Ty
    pTW_GRAYRESPONSE
  • Ty
    pTW_IDENTITY
  • Ty
    pTW_IMAGEINFO
  • Ty
    pTW_IMAGELAYOUT
  • Ty
    pTW_IMAGEMEMXFER
  • Ty
    pTW_JPEGCOMPRESSION
  • Ty
    pTW_PALETTE8
  • Ty
    pTW_PENDINGXFERS
  • Ty
    pTW_RGBRESPONSE
  • Ty
    pTW_SETUPFILEXFER
  • Ty
    pTW_SETUPFILEXFER2
  • Ty
    pTW_SETUPMEMXFER
  • Ty
    pTW_STATUS
  • Ty
    pTW_USERINTERFACE
  • Ty
    pTW_TWUNKIDENTITY
  • Ty
    pTW_TWUNKDSENTRYPARAMS
  • Ty
    pTW_TWUNKDSENTRYRETURN
  • Ty
    pTW_CAPEXT
  • Ty
    pTW_CUSTOMDSDATA
  • Ty
    pTW_INFO
  • Ty
    pTW_EXTIMAGEINFO
  • Ty
    pTW_AUDIOINFO
  • Ty
    pTW_DEVICEEVENT
  • Ty
    pTW_FILESYSTEM
  • Ty
    pTW_PASSTHRU
  • Ty
    pTW_SETUPAUDIOFILEXFER
  • Ty
    pTW_CALLBACK
  • Ty
    DSMENTRYPROC
  • Ty
    DSENTRYPROC
← Low-level, Kernel & Legacy