uiElementColor method

Color uiElementColor(
  1. UIElementType desiredElement
)

Implementation

Color uiElementColor(UIElementType desiredElement) {
  final retValuePtr = calloc<Color>();

  try {
    final hr = ptr.ref.vtable
            .elementAt(18)
            .cast<
                Pointer<
                    NativeFunction<
                        HRESULT Function(Pointer, Int32 desiredElement,
                            Pointer<Color>)>>>()
            .value
            .asFunction<
                int Function(Pointer, int desiredElement, Pointer<Color>)>()(
        ptr.ref.lpVtbl, desiredElement.value, retValuePtr);

    if (FAILED(hr)) throw WindowsException(hr);

    final retValue = retValuePtr.ref;
    return retValue;
  } finally {}
}