[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)

ObtainGIRPort

Set up a RastPort for a custom gadget.

Declaration

Source position: intuition.pas line 3280

function ObtainGIRPort(

  GInfo: PGadgetInfo

):PRastPort;

Arguments

GInfo

  

A pointer to a GadgetInfo structure, as passed to each custom gadget hook function.

Function result

A pointer to a RastPort that may be used for gadget rendering. This pointer may be nil, in which case you should do no rendering. You may (optionally) pass a nil return value to ReleReleaseGIRPort().

Description

Sets up a RastPort for use (only) by custom gadget hook routines. This function must be called each time a hook routine needing to perform gadget rendering is called, and must be accompanied by a corresponding call to ReleaseGIRPort().

Note that if a hook function passes you a RastPort pointer, e.g., GM_RENDER, you needn't call ObtainGIRPort() in that case.

See also

ReleaseGIRPort

  

Release a custom gadget RastPort.


Documentation generated on: 2017-01-10