Difference between revisions of "Unit Framebuffer"
From Ultibo.org
Line 410: | Line 410: | ||
! '''Return''' | ! '''Return''' | ||
| Pointer to the address of the row and column or nil on failure | | Pointer to the address of the row and column or nil on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function FramebufferDeviceWaitSync(Framebuffer:PFramebufferDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wait for the next vertical sync signal from the display hardware</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Framebuffer''' | ||
+ | | The framebuffer device to wait for | ||
+ | |- | ||
+ | ! '''Return''' | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Not all framebuffer devices support wait sync, returns ERROR_CALL_NOT_IMPLEMENTED if not supported. | ||
+ | Devices that support wait sync should set the flag FRAMEBUFFER_FLAG_SYNC | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function FramebufferDeviceGetOffset(Framebuffer:PFramebufferDevice; var X,Y:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the virtual offset X and Y from a framebuffer device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Framebuffer''' | ||
+ | | The framebuffer device to get the offset from | ||
+ | |- | ||
+ | ! '''X''' | ||
+ | | The X (Column) offset value in pixels returned from the device if successful | ||
+ | |- | ||
+ | ! '''Y''' | ||
+ | | The Y (Row) offset value in pixels returned from the device if successful | ||
+ | |- | ||
+ | ! '''Return''' | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | X and Y are relative to the virtual buffer and NOT the physical screen (Where applicable) | ||
+ | Not all framebuffer devices support X and/or Y offset | ||
+ | <br />Devices that support offset X should set the flag FRAMEBUFFER_FLAG_OFFSETX | ||
+ | <br />Devices that support offset Y should set the flag FRAMEBUFFER_FLAG_OFFSETY | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function FramebufferDeviceSetOffset(Framebuffer:PFramebufferDevice; X,Y:LongWord; Pan:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the virtual offset X and Y of a framebuffer device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Framebuffer''' | ||
+ | | The framebuffer device to set the offset for | ||
+ | |- | ||
+ | ! '''X''' | ||
+ | | The X (Column) offset value in pixels to set | ||
+ | |- | ||
+ | ! '''Y''' | ||
+ | | The Y (Row) offset value in pixels to set | ||
+ | |- | ||
+ | ! '''Pan''' | ||
+ | | If True then pan the display without updating the Offset X and/or Y | ||
+ | |- | ||
+ | ! '''Return''' | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | X and Y are relative to the virtual buffer and NOT the physical screen (Where applicable) | ||
+ | Not all framebuffer devices support X and/or Y offset, returns ERROR_CALL_NOT_IMPLEMENTED if not supported | ||
+ | <br />Devices that support offset X should set the flag FRAMEBUFFER_FLAG_OFFSETX | ||
+ | <br />Devices that support offset Y should set the flag FRAMEBUFFER_FLAG_OFFSETY | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function FramebufferDeviceGetPalette(Framebuffer:PFramebufferDevice; Palette:PFramebufferPalette):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the 8 bit color palette from a framebuffer device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Framebuffer''' | ||
+ | | The framebuffer device to get the palette from | ||
+ | |- | ||
+ | ! '''Palette''' | ||
+ | | Pointer to a TFramebufferPalette structure for the palette data | ||
+ | |- | ||
+ | ! '''Return''' | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Not all framebuffer devices support 8 bit palette, returns ERROR_CALL_NOT_IMPLEMENTED if not supported. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function FramebufferDeviceSetPalette(Framebuffer:PFramebufferDevice; Palette:PFramebufferPalette):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the 8 bit color palette of a framebuffer device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Framebuffer''' | ||
+ | | The framebuffer device to set the palette for | ||
+ | |- | ||
+ | ! '''Palette''' | ||
+ | | Pointer to a TFramebufferPalette structure for the palette data | ||
+ | |- | ||
+ | ! '''Return''' | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Not all framebuffer devices support 8 bit palette, returns ERROR_CALL_NOT_IMPLEMENTED if not supported. | ||
|- | |- | ||
|} | |} |
Revision as of 05:46, 21 November 2016
Return to Unit Reference
Contents
[hide]Description
To be documented
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
Framebuffer functions
[Expand]
function FramebufferDeviceAllocate(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Allocate and enable a framebuffer device using supplied properties or defaults
[Expand]
function FramebufferDeviceRelease(Framebuffer:PFramebufferDevice):LongWord;
Description: Disable and release a framebuffer device
[Expand]
function FramebufferDeviceBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
Description: Blank (Turn off) the display of a framebuffer device
[Expand]
function FramebufferDeviceRead(Framebuffer:PFramebufferDevice; X,Y:LongWord; Buffer:Pointer; Len,Flags:LongWord):LongWord;
Description: Read one or more pixels from framebuffer device memory to a supplied buffer
[Expand]
function FramebufferDeviceWrite(Framebuffer:PFramebufferDevice; X,Y:LongWord; Buffer:Pointer; Len,Flags:LongWord):LongWord;
Description: Write one or more pixels to framebuffer device memory from a supplied buffer
[Expand]
function FramebufferDeviceMark(Framebuffer:PFramebufferDevice; X,Y,Width,Height,Flags:LongWord):LongWord;
Description: Mark a region written to the framebuffer and signal the device to take any neccessary actions
[Expand]
function FramebufferDeviceCommit(Framebuffer:PFramebufferDevice; Address,Size,Flags:LongWord):LongWord;
Description: Commit a region written to the framebuffer and signal the device to take any neccessary actions
[Expand]
function FramebufferDeviceGetRect(Framebuffer:PFramebufferDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Skip,Flags:LongWord):LongWord;
Description: Get a rectangular area of pixels from framebuffer memory to a supplied buffer
[Expand]
function FramebufferDevicePutRect(Framebuffer:PFramebufferDevice; X,Y:LongWord;Buffer:Pointer; Width,Height,Skip,Flags:LongWord):LongWord;
Description: Put a rectangular area of pixels from a supplied buffer to framebuffer memory
[Expand]
function FramebufferDeviceCopyRect(Framebuffer:PFramebufferDevice; X1,Y1,X2,Y2,Width,Height,Flags:LongWord):LongWord;
Description: Copy a rectangular area of pixels within framebuffer memory
[Expand]
function FramebufferDeviceFillRect(Framebuffer:PFramebufferDevice; X,Y,Width,Height,Color,Flags:LongWord):LongWord;
Description: Fill a rectangular area of pixels within framebuffer memory
[Expand]
function FramebufferDeviceGetLine(Framebuffer:PFramebufferDevice; Y:LongWord):Pointer;
Description: Get the address of the start of a row in framebuffer memory
[Expand]
function FramebufferDeviceGetPoint(Framebuffer:PFramebufferDevice; X,Y:LongWord):Pointer;
Description: Get the address of the specified row and column in framebuffer memory
[Expand]
function FramebufferDeviceWaitSync(Framebuffer:PFramebufferDevice):LongWord;
Description: Wait for the next vertical sync signal from the display hardware
[Expand]
function FramebufferDeviceGetOffset(Framebuffer:PFramebufferDevice; var X,Y:LongWord):LongWord;
Description: Get the virtual offset X and Y from a framebuffer device
[Expand]
function FramebufferDeviceSetOffset(Framebuffer:PFramebufferDevice; X,Y:LongWord; Pan:Boolean):LongWord;
Description: Set the virtual offset X and Y of a framebuffer device
[Expand]
function FramebufferDeviceGetPalette(Framebuffer:PFramebufferDevice; Palette:PFramebufferPalette):LongWord;
Description: Get the 8 bit color palette from a framebuffer device
[Expand]
function FramebufferDeviceSetPalette(Framebuffer:PFramebufferDevice; Palette:PFramebufferPalette):LongWord;
Description: Set the 8 bit color palette of a framebuffer device
[Expand]
function FramebufferDeviceSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;
Description: Set the brightness of the backlight of a framebuffer device
[Expand]
function FramebufferDeviceGetProperties(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Get the current properties from a framebuffer device
[Expand]
function FramebufferDeviceSetProperties(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Set the current properties for a framebuffer device
[Expand]
function FramebufferDeviceCheckFlag(Framebuffer:PFramebufferDevice; Flag:LongWord):Boolean;
Description: To be documented
[Expand]
function FramebufferDeviceGetFormat(Framebuffer:PFramebufferDevice):LongWord;
Description: To be documented
[Expand]
function FramebufferDeviceCreate:PFramebufferDevice;
Description: Create a new Framebuffer entry
[Expand]
function FramebufferDeviceCreateEx(Size:LongWord):PFramebufferDevice;
Description: Create a new Framebuffer entry
[Expand]
function FramebufferDeviceDestroy(Framebuffer:PFramebufferDevice):LongWord;
Description: Destroy an existing Framebuffer entry
[Expand]
function FramebufferDeviceRegister(Framebuffer:PFramebufferDevice):LongWord;
Description: Register a new Framebuffer in the Framebuffer table
[Expand]
function FramebufferDeviceDeregister(Framebuffer:PFramebufferDevice):LongWord;
Description: Deregister a Framebuffer from the Framebuffer table
[Expand]
function FramebufferDeviceFind(FramebufferId:LongWord):PFramebufferDevice;
Description: To be documented
[Expand]
function FramebufferDeviceFindByName(const Name:String):PFramebufferDevice; inline;
Description: To be documented
[Expand]
function FramebufferDeviceFindByDescription(const Description:String):PFramebufferDevice; inline;
Description: To be documented
[Expand]
function FramebufferDeviceEnumerate(Callback:TFramebufferEnumerate; Data:Pointer):LongWord;
Description: To be documented
[Expand]
function FramebufferDeviceNotification(Framebuffer:PFramebufferDevice; Callback:TFramebufferNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented
RTL framebuffer functions
[Expand]
function SysFramebufferAvailable:Boolean;
Description: Check if a framebuffer device is available
Framebuffer helper functions
[Expand]
function FramebufferDeviceGetCount:LongWord; inline;
Description: Get the current framebuffer device count
[Expand]
function FramebufferDeviceGetDefault:PFramebufferDevice; inline;
Description: Get the current default framebuffer device
[Expand]
function FramebufferDeviceSetDefault(Framebuffer:PFramebufferDevice):LongWord;
Description: Set the current default framebuffer device
[Expand]
function FramebufferDeviceCheck(Framebuffer:PFramebufferDevice):PFramebufferDevice;
Description: Check if the supplied Framebuffer device is in the Framebuffer table
[Expand]
function FramebufferDeviceSwap(Value:LongWord):LongWord; inline;
Description: No longer required (See ColorDefaultToFormat and ColorFormatToDefault)
[Expand]
function FramebufferRotationToString(Rotation:LongWord):String;
Description: To be documented
Return to Unit Reference