getContentProtection property

  1. @override
Future<DwmDisplayAffinity?> get getContentProtection
override

getContentProtection Retrieves the current display affinity setting, from any process, for a given window.

Implementation

@override
Future<DwmDisplayAffinity?> get getContentProtection async {
  final result = await methodChannel.invokeMethod(getContentProtectionMethod);

  // print({'DwmDisplayAffinity': result});

  if (result == DwmDisplayAffinity.none.dword) {
    return DwmDisplayAffinity.none;
  } else if (result == DwmDisplayAffinity.monitor.dword) {
    return DwmDisplayAffinity.monitor;
  } else if (result == DwmDisplayAffinity.excludeFromCapture.dword) {
    return DwmDisplayAffinity.excludeFromCapture;
  }

  return null;
}