Пример #1
0
        /// <inheritdoc />
        public void Refresh(Rectangle rectangle, WaveformMode mode, DisplayTemp displayTemp, UpdateMode updateMode)
        {
            Framebuffer.ConstrainRectangle(ref rectangle);
            var data = new FbUpdateData
            {
                UpdateRegion = new FbRect
                {
                    X      = (uint)rectangle.X,
                    Y      = (uint)rectangle.Y,
                    Width  = (uint)rectangle.Width,
                    Height = (uint)rectangle.Height
                },
                WaveformMode = mode,
                DisplayTemp  = displayTemp,
                UpdateMode   = updateMode,
                UpdateMarker = _updateMarker,
                DitherMode   = 0,
                QuantBit     = 0,
                Flags        = 0
            };

            var retCode = DisplayIoctl.Ioctl(_handle, IoctlDisplayCommand.SendUpdate, ref data);

            if (retCode == -1)
            {
                throw new UnixException();
            }

            _updateMarker = (uint)retCode;
        }
Пример #2
0
 /// <summary>
 ///     Writes variable device to the display
 /// </summary>
 /// <param name="vinfo">A populated <see cref="FbVarScreenInfo" /></param>
 public void PutVarScreenInfo(FbVarScreenInfo vinfo)
 {
     if (DisplayIoctl.Ioctl(_handle, IoctlDisplayCommand.PutVariableScreenInfo, ref vinfo) == -1)
     {
         throw new UnixException();
     }
 }
Пример #3
0
        /// <summary>
        ///     Reads variable device information from the display
        /// </summary>
        /// <returns>A populated <see cref="FbVarScreenInfo" /></returns>
        public FbVarScreenInfo GetVarScreenInfo()
        {
            var vinfo = new FbVarScreenInfo();

            if (DisplayIoctl.Ioctl(_handle, IoctlDisplayCommand.GetVariableScreenInfo, ref vinfo) == -1)
            {
                throw new UnixException();
            }
            return(vinfo);
        }
Пример #4
0
        /// <summary>
        ///     Reads fixed device information from the display
        /// </summary>
        /// <returns>A populated <see cref="FbFixedScreenInfo" /></returns>
        public FbFixedScreenInfo GetFixedScreenInfo()
        {
            var finfo = new FbFixedScreenInfo();

            if (DisplayIoctl.Ioctl(_handle, IoctlDisplayCommand.GetFixedScreenInfo, ref finfo) == -1)
            {
                throw new UnixException();
            }
            return(finfo);
        }