Esempio n. 1
0
        /// <summary>
        /// Same as CorsairSetLedsColorsFlushBuffer but returns control to the caller immediately.
        /// </summary>
        /// <param name="callback">Callback that is called by SDK when colors are set. Can be NULL if client is not interested in result</param>
        /// <param name="context">Arbitrary context that will be returned in callback call. Can be NULL</param>
        /// <returns>Boolean value. True if successful. Use CorsairGetLastError() to check the reason of failure. If there is no such ledId in the LEDs colors buffer present in currently connected hardware (missing key in physical keyboard layout, or trying to control mouse while it’s disconnected) then functions completes successfully and returns true.</returns>
        public static bool CorsairSetLedsColorsFlushBufferAsync(CorsairSetLedsColorsFlushBufferAsyncCallback callback, object context)
        {
            var callbackMethod = new CUESDKNative.CorsairSetLedsColorsFlushBufferAsyncCallback((IntPtr nativeContext, bool result, CorsairError error) =>
            {
                callback?.Invoke(context, result, error);
            });

            return(CUESDKNative.CorsairSetLedsColorsFlushBufferAsync(callbackMethod, new IntPtr()));
        }
Esempio n. 2
0
 public static extern bool CorsairSetLedsColorsFlushBufferAsync(CorsairSetLedsColorsFlushBufferAsyncCallback callback, IntPtr context);