> home > Custom Layer Boundary API

view_get_preferred_x

September 8th 2024
Get the x coordinate of the core tracked preferred x on a view

Signature

C++
f32
view_get_preferred_x(Application_Links* app,
                     View_ID view_id);

Parameters

app

the standard custom layer context pointer

view_id

the id of the view to query

Return

the preferred x of the view in pixels from the left edge of buffer layout space, if the view exists, otherwise zero