EnumFontFamiliesEx function Null safety gdi32

int EnumFontFamiliesEx(
  1. int hdc,
  2. Pointer<LOGFONT> lpLogfont,
  3. Pointer<NativeFunction<EnumFontFamExProc>> lpProc,
  4. int lParam,
  5. int dwFlags
)

The EnumFontFamiliesEx function enumerates all uniquely-named fonts in the system that match the font characteristics specified by the LOGFONT structure. EnumFontFamiliesEx enumerates fonts based on typeface name, character set, or both.

int EnumFontFamiliesExW(
  HDC           hdc,
  LPLOGFONTW    lpLogfont,
  FONTENUMPROCW lpProc,
  LPARAM        lParam,
  DWORD         dwFlags
);

Implementation

int EnumFontFamiliesEx(
    int hdc,
    Pointer<LOGFONT> lpLogfont,
    Pointer<NativeFunction<EnumFontFamExProc>> lpProc,
    int lParam,
    int dwFlags) {
  final _EnumFontFamiliesEx = _gdi32.lookupFunction<
      Int32 Function(
          IntPtr hdc,
          Pointer<LOGFONT> lpLogfont,
          Pointer<NativeFunction<EnumFontFamExProc>> lpProc,
          IntPtr lParam,
          Uint32 dwFlags),
      int Function(
          int hdc,
          Pointer<LOGFONT> lpLogfont,
          Pointer<NativeFunction<EnumFontFamExProc>> lpProc,
          int lParam,
          int dwFlags)>('EnumFontFamiliesExW');
  return _EnumFontFamiliesEx(hdc, lpLogfont, lpProc, lParam, dwFlags);
}