Unit 'intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

TGadgetInfo

The TGadgetInfo structure contains information about the display on which the gadget needs to render itself

Declaration

Source position: intuition.pas line 2485

type TGadgetInfo = record

  gi_Screen: PScreen;

  

ScreenPtr

  gi_Window: PWindow;

  

nil for screen gadgets

  gi_Requester: PRequester;

  

nil IF not GTYP_REQGADGET

  gi_RastPort: PRastPort;

  

Rendering information: don't use these without cloning/locking. Official way is to call ObtainGIRPort()

  gi_Layer: PLayer;

  

LayerPtr

  gi_Domain: TIBox;

  

Copy of dimensions of screen/window/g00/req(/group) that gadget resides in.

  gi_Pens: record

  

    DetailPen: Byte;

  

    BlockPen: Byte;

  

  end;

  gi_DrInfo: PDrawInfo;

  

the Detail and Block pens in gi_DrInfo^.dri_Pens[] are for the screen. Use the above for window-sensitive colors.

  gi_Gadget: PGadget;

  gi_Reserved: array [0..4] of LongWord;

  

end;

Description

All the fields in this structure are read only.

Although this structure contains a pointer to the gadget's RastPort structure, applications should not use it for rendering. Instead, use the intuition.library function ObtainGIRPort() to obtain a copy of the GadgetInfo's RastPort. When the gadget is finished with this RastPort, it should call ReleaseGIRPort() to relinquish the RastPort.

See also

TopSet

  

Message structure for OM_NEW/OM_SET

TopUpdate

  

Message structure for OM_NOTIFY/OM_UPDATE

TgpHitTest

  

Message parameter passed for GM_HITTEST or GM_HELPTEST

TgpRender

  

Message parameter passed for GM_RENDER

TgpInput

  

Message parameter passed for GM_GOACTIVE or GM_HANDLEINPUT

TgpGoInactive

  

Message parameter passed for GM_GOINACTIVE

TgpLayout

  

Message parameter passed for GM_LAYOUT

TgpDomain

  

TSGWork

  

String gadget message

GadgetMouse

  

Calculate gadget-relative mouse position.

ObtainGIRPort

  

Set up a RastPort for a custom gadget.


Documentation generated on: 2021-07-30