GreDeviceAnimatePalette

From EDM2
Revision as of 21:23, 23 May 2020 by Ak120 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

GreDeviceAnimatePalette is the presentation driver version of GpiAnimatePalette. It is called to process an application's GpiAnimatePalette request. The purpose of this function is to modify the RGB values in the hardware palette rapidly and make the changes apparent immediately. Changes are reflected immediately for each logical palette entry that is marked as PC-RESERVED and is associated with a hardware slot. The RGB value on the logical application's palette, as well as the hardware palette itself, are updated.

This function can be hooked by the presentation driver.

Simulation support
This function is simulated by a handling routine in Revision 2.0 (or higher) of the graphics engine.

Syntax

GreDeviceAnimatePalette(hdc, hdevpal, ulFormat, ulStart, cclr, pclr, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
hdevpal (ULONG) - input
Device palette handle.
ulFormat (ULONG) - input
Specifies the entry format. Must be LCOLF_CONSECRGB.
ulStart (ULONG) - input
Starting index, that is, the first palette entry to change.
cclr (ULONG) - input
Count of the palette entries to change.
pclr (PULONG) - input
Pointer to table of new RGB2 palette entries.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreDeviceAnimatePalette.

Returns

rc (ULONG) - returns
Return codes.
PAL-ERROR Error Count of the hardware palette slots changed.
Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
  • PMERR_PALETTE_BUSY
  • PMERR_INV_IN_AREA
  • PMERR_INV_IN_PATH.

Remarks

This function modifies the colors in a palette. Changes are reflected immediately for each animated index that has a hardware slot.