2017-09-13 01:11:06 -07:00
|
|
|
import eina_types;
|
|
|
|
|
2019-02-14 08:37:02 -08:00
|
|
|
interface @beta Efl.Layout.Calc
|
2017-08-01 02:15:34 -07:00
|
|
|
{
|
|
|
|
[[This interface defines a common set of APIs used to trigger calculations
|
|
|
|
with layout objects.
|
|
|
|
|
|
|
|
This defines all the APIs supported by legacy "Edje" object, known in EO
|
|
|
|
API as Efl.Canvas.Layout.
|
|
|
|
|
|
|
|
@since 1.21
|
|
|
|
]]
|
2017-12-06 17:24:08 -08:00
|
|
|
event_prefix: efl_layout;
|
2017-08-01 02:15:34 -07:00
|
|
|
methods {
|
|
|
|
@property calc_auto_update_hints {
|
|
|
|
[[Whether this object updates its size hints automatically.
|
|
|
|
|
|
|
|
By default edje doesn't set size hints on itself. If this property
|
|
|
|
is set to $true, size hints will be updated after recalculation.
|
|
|
|
Be careful, as recalculation may happen often, enabling this
|
|
|
|
property may have a considerable performance impact as other widgets
|
|
|
|
will be notified of the size hints changes.
|
|
|
|
|
|
|
|
A layout recalculation can be triggered by @.calc_size_min(),
|
2017-09-18 01:31:54 -07:00
|
|
|
@.calc_size_min(), @.calc_parts_extends() or even any other internal
|
|
|
|
event.
|
2017-08-01 02:15:34 -07:00
|
|
|
]]
|
|
|
|
set {
|
|
|
|
[[Enable or disable auto-update of size hints.]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Whether this object updates its size hints automatically.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
update: bool(false); [[Whether or not update the size hints.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
calc_size_min {
|
|
|
|
[[Calculates the minimum required size for a given layout object.
|
|
|
|
|
|
|
|
This call will trigger an internal recalculation of all parts of
|
|
|
|
the object, in order to return its minimum required dimensions for
|
|
|
|
width and height. The user might choose to impose those minimum
|
2017-09-18 01:31:54 -07:00
|
|
|
sizes, making the resulting calculation to get to values greater or
|
|
|
|
equal than $restricted in both directions.
|
2017-08-01 02:15:34 -07:00
|
|
|
|
|
|
|
Note: At the end of this call, the object won't be automatically
|
|
|
|
resized to the new dimensions, but just return the calculated sizes.
|
|
|
|
The caller is the one up to change its geometry or not.
|
|
|
|
|
|
|
|
Warning: Be advised that invisible parts in the object will be taken
|
|
|
|
into account in this calculation.
|
|
|
|
]]
|
2017-09-18 01:19:03 -07:00
|
|
|
return: Eina.Size2D; [[The minimum required size.]]
|
2017-08-01 02:15:34 -07:00
|
|
|
params {
|
2017-09-18 01:19:03 -07:00
|
|
|
@in restricted: Eina.Size2D @optional;
|
|
|
|
[[The minimum size constraint as input, the returned size
|
|
|
|
can not be lower than this (in both directions).]]
|
2017-08-01 02:15:34 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
calc_parts_extends {
|
|
|
|
[[Calculates the geometry of the region, relative to a given layout
|
|
|
|
object's area, occupied by all parts in the object.
|
|
|
|
|
|
|
|
This function gets the geometry of the rectangle equal to the area
|
|
|
|
required to group all parts in obj's group/collection. The x
|
|
|
|
and y coordinates are relative to the top left corner of the
|
|
|
|
whole obj object's area. Parts placed out of the group's
|
|
|
|
boundaries will also be taken in account, so that x and y
|
|
|
|
may be negative.
|
|
|
|
|
|
|
|
Note: On failure, this function will make all non-$null geometry
|
|
|
|
pointers' pointed variables be set to zero.
|
|
|
|
]]
|
2017-09-13 19:59:44 -07:00
|
|
|
return: Eina.Rect; [[The calculated region.]]
|
2017-08-01 02:15:34 -07:00
|
|
|
}
|
|
|
|
calc_freeze {
|
|
|
|
[[Freezes the layout object.
|
|
|
|
|
|
|
|
This function puts all changes on hold. Successive freezes will
|
|
|
|
nest, requiring an equal number of thaws.
|
|
|
|
|
|
|
|
See also @.calc_thaw.
|
|
|
|
]]
|
|
|
|
return: int; [[The frozen state or 0 on error]]
|
|
|
|
}
|
|
|
|
calc_thaw {
|
|
|
|
[[Thaws the layout object.
|
|
|
|
|
|
|
|
This function thaws (in other words "unfreezes") the given layout
|
|
|
|
object.
|
|
|
|
|
|
|
|
Note: If sucessive freezes were done, an equal number of thaws will
|
|
|
|
be required.
|
|
|
|
|
|
|
|
See also @.calc_freeze.
|
|
|
|
]]
|
|
|
|
return: int; [[The frozen state or 0 if the object is not frozen or on error.]]
|
|
|
|
}
|
|
|
|
calc_force @protected {
|
|
|
|
[[Forces a Size/Geometry calculation.
|
|
|
|
|
|
|
|
Forces the object to recalculate its layout regardless of
|
|
|
|
freeze/thaw. This API should be used carefully.
|
|
|
|
|
|
|
|
See also @.calc_freeze and @.calc_thaw.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
}
|
2017-12-06 17:24:08 -08:00
|
|
|
events {
|
efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).
In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).
Test Plan: make with c# bindings works, make check and make examples work too.
Reviewers: cedric, q66, lauromoura
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6169
2018-05-11 08:20:40 -07:00
|
|
|
recalc: void; [[The layout was recalculated.]]
|
|
|
|
/* FIXME: The actual type is list<string> but the C# bindings do not support that yet */
|
|
|
|
circular,dependency: void; [[A circular dependency between parts of the
|
2017-12-06 17:24:08 -08:00
|
|
|
object was found.]]
|
|
|
|
}
|
2017-08-01 02:15:34 -07:00
|
|
|
}
|