GetTabbedTextExtent function Null safety user32

int GetTabbedTextExtent (
  1. int hdc,
  2. Pointer<Utf16> lpString,
  3. int chCount,
  4. int nTabPositions,
  5. Pointer<Int32> lpnTabStopPositions
)

The GetTabbedTextExtent function computes the width and height of a character string. If the string contains one or more tab characters, the width of the string is based upon the specified tab stops. The GetTabbedTextExtent function uses the currently selected font to compute the dimensions of the string.

DWORD GetTabbedTextExtentW(
  HDC       hdc,
  LPCWSTR   lpString,
  int       chCount,
  int       nTabPositions,
  const INT *lpnTabStopPositions
);

Implementation

int GetTabbedTextExtent(int hdc, Pointer<Utf16> lpString, int chCount,
    int nTabPositions, Pointer<Int32> lpnTabStopPositions) {
  final _GetTabbedTextExtent = _user32.lookupFunction<
      Uint32 Function(IntPtr hdc, Pointer<Utf16> lpString, Int32 chCount,
          Int32 nTabPositions, Pointer<Int32> lpnTabStopPositions),
      int Function(
          int hdc,
          Pointer<Utf16> lpString,
          int chCount,
          int nTabPositions,
          Pointer<Int32> lpnTabStopPositions)>('GetTabbedTextExtentW');
  return _GetTabbedTextExtent(
      hdc, lpString, chCount, nTabPositions, lpnTabStopPositions);
}