Difference between revisions of "Unit Framebuffer"
From Ultibo.org
Line 10: | Line 10: | ||
---- | ---- | ||
− | '' | + | |
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Framebuffer specific constants''' <code> FRAMEBUFFER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_NAME_PREFIX = 'Framebuffer';</code> | ||
+ | | Name prefix for Framebuffer Devices | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Framebuffer device type constants''' <code> FRAMEBUFFER_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_TYPE_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_TYPE_HARDWARE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_TYPE_VIRTUAL = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Framebuffer device state constants''' <code> FRAMEBUFFER_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_STATE_DISABLED = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_STATE_ENABLED = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Framebuffer device flag constants''' <code> FRAMEBUFFER_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_NONE = $00000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_DMA = $00000001;</code> | ||
+ | | If set the framebuffer supports DMA for read/write operations | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_MARK = $00000002;</code> | ||
+ | | If set the framebuffer requires mark after write operations | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_COMMIT = $00000004;</code> | ||
+ | | If set the framebuffer requires commit after write operations | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_BLANK = $00000008;</code> | ||
+ | | If set the framebuffer supports blanking the screen | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_CACHED = $00000010;</code> | ||
+ | | If set framebuffer is in cached memory and cache cleaning should be used | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_SWAP = $00000020;</code> | ||
+ | | If set framebuffer requires byte order of colors to be reversed (BGR <-> RGB) | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_BACKLIGHT = $00000040;</code> | ||
+ | | If set the framebuffer supports setting the backlight brightness | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_VIRTUAL = $00000080;</code> | ||
+ | | If set the framebuffer supports virtual width and height | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_OFFSETX = $00000100;</code> | ||
+ | | If set the framebuffer supports virtual offset X (Horizontal Pan/Flip etc) | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_OFFSETY = $00000200;</code> | ||
+ | | If set the framebuffer supports virtual offset Y (Vertical Pan/Flip etc) | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_FLAG_SYNC = $00000400;</code> | ||
+ | | If set the framebuffer supports waiting for vertical sync | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Framebuffer transfer flag constants''' <code> FRAMEBUFFER_TRANSFER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_TRANSFER_NONE = $00000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FRAMEBUFFER_TRANSFER_DMA = $00000001;</code> | ||
+ | | Use DMA for transfer operations (Note: Buffers must be DMA compatible) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
Line 24: | Line 124: | ||
=== Function declarations === | === Function declarations === | ||
---- | ---- | ||
− | + | ||
+ | |||
'''Initialization functions''' | '''Initialization functions''' | ||
Revision as of 00:13, 28 November 2016
Return to Unit Reference
Contents
[hide]Description
To be documented
Constants
[Expand]
Framebuffer specific constants
FRAMEBUFFER_*
[Expand]
Framebuffer device type constants
FRAMEBUFFER_TYPE_*
[Expand]
Framebuffer device state constants
FRAMEBUFFER_STATE_*
[Expand]
Framebuffer device flag constants
FRAMEBUFFER_FLAG_*
[Expand]
Framebuffer transfer flag constants
FRAMEBUFFER_TRANSFER_*
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