Advertisement
Guest User

Untitled

a guest
Jun 5th, 2017
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.15 KB | None | 0 0
  1. using System.Runtime.InteropServices;
  2. using System;
  3.  
  4. namespace Kolkhoze {
  5.  
  6.     public class AlienWrapper {
  7.         public static readonly int LFX_SUCCESS = 0;
  8.  
  9.  
  10.         public struct LFX_COLOR {
  11.             byte red;
  12.             byte green;
  13.             byte blue;
  14.             byte brightness;
  15.        
  16.             public LFX_COLOR(byte red, byte green, byte blue, byte brightness) {
  17.                 this.red = red;
  18.                 this.green = green;
  19.                 this.blue = blue;
  20.                 this.brightness = brightness;
  21.             }
  22.         }
  23.            
  24.         [DllImport("LightFX", EntryPoint="LFX_Initialize")]
  25.         public static extern uint LFX_Initialize();
  26.  
  27.         [DllImport("LightFX", EntryPoint="LFX_Reset")]
  28.         public static extern uint LFX_Reset();
  29.  
  30.         [DllImport("LightFX", EntryPoint="LFX_Update")]
  31.         public static extern uint LFX_Update();
  32.  
  33.         [DllImport("LightFX", EntryPoint="LFX_GetNumDevices")]
  34.         public static extern uint LFX_GetNumDevices(ref uint nb);
  35.  
  36.         [DllImport("LightFX", EntryPoint="LFX_GetNumLights")]
  37.         public static extern uint LFX_GetNumLights(uint devIndex, ref uint nb);
  38.  
  39.         [DllImport("LightFX", EntryPoint="LFX_SetLightColor")]
  40.         public static extern uint LFX_SetLightColor(uint devIndex, uint lightIndex, ref LFX_COLOR colorPtr);
  41.  
  42.  
  43.  
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement