occluded = LayerOccluded( l )
d0 a0
LONG LayerOccluded(struct Layer *);
This function checks whether the indicated layer is occluded by any other layer of the same layer info. It returns FALSE in case the layer is fully visible, or returns TRUE if parts of this layer are covered by any other layer of the same Layer_Info.
You should at least lock the Layer_Info of the layer or the result is unpredictable as the layer arrangement may change while this function is running.