Declaration ​
pascal
procedure RegisterGammaChangeNotification(Delegate: TGammaChangedProc);Parameters ​
| Parameter | Type | Description |
|---|---|---|
Delegate | TGammaChangedProc | Object method delegate signature procedure of object to register for notifications. |
Description ​
RegisterGammaChangeNotification registers a callback procedure (TGammaChangedProc) into the global delegate list.
Whenever SetGamma or Set_sRGB is called to modify global lookup tables (GAMMA_ENCODING_TABLE or GAMMA_DECODING_TABLE), all registered delegates are invoked automatically.
Thread Safety
RegisterGammaChangeNotification and gamma delegate invocation are not thread-safe. Do not modify registered delegates or change global gamma settings concurrently across multiple execution threads.
Delegate Signature ​
pascal
type
TGammaChangedProc = procedure of object;Example ​
pascal
type
TMyImageControl = class
private
procedure GammaChanged;
public
constructor Create;
destructor Destroy; override;
end;
constructor TMyImageControl.Create;
begin
inherited;
RegisterGammaChangeNotification(GammaChanged);
end;
destructor TMyImageControl.Destroy;
begin
UnregisterGammaChangeNotification(GammaChanged);
inherited;
end;
procedure TMyImageControl.GammaChanged;
begin
// Repaint or recalculate buffers when global gamma changes
end;