Пример #1
0
        private static unsafe int DoSetColor(IntPtr aPtr, uint aVersion, uint aIndex, uint aColor)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceZappOrgTestLights1 self = (DvServiceZappOrgTestLights1)gch.Target;

            self.SetColor(aVersion, aIndex, aColor);
            return(0);
        }
Пример #2
0
        private static unsafe int DoGetName(IntPtr aPtr, uint aVersion, uint aIndex, char **aFriendlyName)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceZappOrgTestLights1 self = (DvServiceZappOrgTestLights1)gch.Target;
            string friendlyName;

            self.GetName(aVersion, aIndex, out friendlyName);
            *aFriendlyName = (char *)Marshal.StringToHGlobalAnsi(friendlyName).ToPointer();
            return(0);
        }
Пример #3
0
        private static unsafe int DoGetCount(IntPtr aPtr, uint aVersion, uint *aCount)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceZappOrgTestLights1 self = (DvServiceZappOrgTestLights1)gch.Target;
            uint count;

            self.GetCount(aVersion, out count);
            *aCount = count;
            return(0);
        }
Пример #4
0
        private static unsafe int DoGetPosition(IntPtr aPtr, uint aVersion, uint aIndex, uint *aX, uint *aY, uint *aZ)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceZappOrgTestLights1 self = (DvServiceZappOrgTestLights1)gch.Target;
            uint x;
            uint y;
            uint z;

            self.GetPosition(aVersion, aIndex, out x, out y, out z);
            *aX = x;
            *aY = y;
            *aZ = z;
            return(0);
        }
Пример #5
0
        private static unsafe int DoGetColorComponents(IntPtr aPtr, uint aVersion, uint aColor, uint *aBrightness, uint *aRed, uint *aGreen, uint *aBlue)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceZappOrgTestLights1 self = (DvServiceZappOrgTestLights1)gch.Target;
            uint brightness;
            uint red;
            uint green;
            uint blue;

            self.GetColorComponents(aVersion, aColor, out brightness, out red, out green, out blue);
            *aBrightness = brightness;
            *aRed        = red;
            *aGreen      = green;
            *aBlue       = blue;
            return(0);
        }