Tizen Native API

Functions

void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Sets the hints for an object's maximum size.
void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 Retrieves the hints for an object's maximum size.
void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Sets the hints for an object's minimum size.
void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 Retrieves the hints for an object's minimum size.
void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
 Sets the hints for an object's aspect ratio.
void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h)
 Retrieves the hints for an object's aspect ratio.
void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b)
 Sets the hints for an object's padding space.
void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
 Retrieves the hints for an object's padding space.
void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y)
 Sets the hints for an object's weight.
void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y)
 Retrieves the hints for an object's weight.
void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y)
 Sets the hints for an object's alignment.
void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y)
 Retrieves the hints for on object's alignment.
void evas_object_size_hint_display_mode_set (Evas_Object *obj, Evas_Display_Mode dispmode)
 Sets the hints for an object's disply mode.
Evas_Display_Mode evas_object_size_hint_display_mode_get (const Evas_Object *obj)
 Retrieves the hints for an object's display mode.

Defines

#define evas_object_size_hint_fill_set   evas_object_size_hint_align_set
 Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align)
#define evas_object_size_hint_fill_get   evas_object_size_hint_align_get
 Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align)
#define evas_object_size_hint_expand_set   evas_object_size_hint_weight_set
 Convenience macro to make it easier to understand that weight is also used for expand properties.
#define evas_object_size_hint_expand_get   evas_object_size_hint_weight_get
 Convenience macro to make it easier to understand that weight is also used for expand properties.

Objects may carry hints, so that another object that acts as a manager (see Smart Object Functions) may know how to properly position and resize its subordinate objects. The Size Hints provide a common interface that is recommended as the protocol for such information.

For example, box objects use alignment hints to align its lines/columns inside its container, padding hints to set the padding between each individual child, etc.

Examples on their usage:


Define Documentation

Convenience macro to make it easier to understand that weight is also used for expand properties.

Since :
2.3

Convenience macro to make it easier to understand that weight is also used for expand properties.

Since :
2.3

Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align)

Since :
2.3

Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align)

Since :
2.3

Function Documentation

void evas_object_size_hint_align_get ( const Evas_Object obj,
double *  x,
double *  y 
)

Retrieves the hints for on object's alignment.

Since :
2.3
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Use NULL pointers on the hint components you're not interested in: they'll be ignored by the function.
Note:
If obj is invalid, then the hint components will be set with 0.5
See also:
evas_object_size_hint_align_set() for more information
Parameters:
[in]objThe evas object
[out]xDouble, ranging from 0.0 to 1.0 or with the special value EVAS_HINT_FILL, to use as horizontal alignment hint.
[out]yDouble, ranging from 0.0 to 1.0 or with the special value EVAS_HINT_FILL, to use as vertical alignment hint.
void evas_object_size_hint_align_set ( Evas_Object obj,
double  x,
double  y 
)

Sets the hints for an object's alignment.

Since :
2.3
Remarks:
These are hints on how to align an object inside the boundaries of a container/manager. Accepted values are in the 0.0 to 1.0 range, with the special value EVAS_HINT_FILL used to specify "justify" or "fill" by some users. In this case, maximum size hints should be enforced with higher priority, if they are set. Also, any padding hint set on objects should add up to the alignment space on the final scene composition.
See documentation of possible users: in Evas, they are the box and table smart objects.
For the horizontal component, 0.0 means to the left, 1.0 means to the right. Analogously, for the vertical component, 0.0 to the top, 1.0 means to the bottom.
See the following figure:
alignment-hints.png
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Default alignment hint values are 0.5, for both axis.
Example:
In this example the alignment hints change the behavior of an Evas box when layouting its children. See the full example.
See also:
evas_object_size_hint_align_get()
evas_object_size_hint_max_set()
evas_object_size_hint_padding_set()
Parameters:
[in]objThe evas object
[in]xDouble, ranging from 0.0 to 1.0 or with the special value EVAS_HINT_FILL, to use as horizontal alignment hint.
[in]yDouble, ranging from 0.0 to 1.0 or with the special value EVAS_HINT_FILL, to use as vertical alignment hint.
void evas_object_size_hint_aspect_get ( const Evas_Object obj,
Evas_Aspect_Control aspect,
Evas_Coord w,
Evas_Coord h 
)

Retrieves the hints for an object's aspect ratio.

Since :
2.3
Remarks:
The different aspect ratio policies are documented in the Evas_Aspect_Control type. A container respecting these size hints would resize its children accordingly to those policies.
For any policy, if any of the given aspect ratio terms are 0, the object's container should ignore the aspect and scale obj to occupy the whole available area. If they are both positive integers, that proportion will be respected, under each scaling policy.
These images illustrate some of the Evas_Aspect_Control policies:
any-policy.png
aspect-control-none-neither.png
aspect-control-both.png
aspect-control-horizontal.png
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Use NULL pointers on the hint components you're not interested in: they'll be ignored by the function.
Example:
See the full example.
See also:
evas_object_size_hint_aspect_set()
Parameters:
[in]objThe evas object
[out]aspectThe policy/type of aspect ratio to apply to obj.
[out]wInteger to use as aspect width ratio term.
[out]hInteger to use as aspect height ratio term.

Sets the hints for an object's aspect ratio.

Since :
2.3
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
If any of the given aspect ratio terms are 0, the object's container will ignore the aspect and scale obj to occupy the whole available area, for any given policy.
See also:
evas_object_size_hint_aspect_get() for more information.
Parameters:
[in]objThe evas object
[in]aspectThe policy/type of aspect ratio to apply to obj.
[in]wInteger to use as aspect width ratio term.
[in]hInteger to use as aspect height ratio term.

Retrieves the hints for an object's display mode.

Since :
2.3
Remarks:
These are hints on the display mode obj. This is not a size enforcement in any way, it's just a hint that can be used whenever appropriate. This mode can be used object's display mode like commpress or expand
Parameters:
[in]objThe evas object

Sets the hints for an object's disply mode.

Since :
2.3
Remarks:
This is not a size enforcement in any way, it's just a hint that can be used whenever appropriate.
Parameters:
[in]objThe evas object
[in]dispmodedisplay mode hint
void evas_object_size_hint_max_get ( const Evas_Object obj,
Evas_Coord w,
Evas_Coord h 
)

Retrieves the hints for an object's maximum size.

Since :
2.3
Remarks:
These are hints on the maximum sizes obj should have. This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Use NULL pointers on the hint components you're not interested in: they'll be ignored by the function.
See also:
evas_object_size_hint_max_set()
Parameters:
[in]objThe evas object
[out]wInteger to use as the maximum width hint.
[out]hInteger to use as the maximum height hint.

Sets the hints for an object's maximum size.

Since :
2.3
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Values -1 will be treated as unset hint components, when queried by managers.
Example:
In this example the maximum size hints change the behavior of an Evas box when layouting its children. See the full example.
See also:
evas_object_size_hint_max_get()
Parameters:
[in]objThe evas object
[in]wInteger to use as the maximum width hint.
[in]hInteger to use as the maximum height hint.
void evas_object_size_hint_min_get ( const Evas_Object obj,
Evas_Coord w,
Evas_Coord h 
)

Retrieves the hints for an object's minimum size.

Since :
2.3
Remarks:
These are hints on the minimum sizes obj should have. This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Use NULL pointers on the hint components you're not interested in: they'll be ignored by the function.
See also:
evas_object_size_hint_min_set() for an example
Parameters:
[in]objThe evas object
[out]wInteger to use as the minimum width hint.
[out]hInteger to use as the minimum height hint.

Sets the hints for an object's minimum size.

Since :
2.3
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Values 0 will be treated as unset hint components, when queried by managers.
Example:
In this example the minimum size hints change the behavior of an Evas box when layouting its children. See the full example.
See also:
evas_object_size_hint_min_get()
Parameters:
[in]objThe evas object
[in]wInteger to use as the minimum width hint.
[in]hInteger to use as the minimum height hint.
void evas_object_size_hint_padding_get ( const Evas_Object obj,
Evas_Coord l,
Evas_Coord r,
Evas_Coord t,
Evas_Coord b 
)

Retrieves the hints for an object's padding space.

Since :
2.3
Remarks:
Padding is extra space an object takes on each of its delimiting rectangle sides, in canvas units. This space will be rendered transparent, naturally, as in the following figure:
padding-hints.png
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Use NULL pointers on the hint components you're not interested in: they'll be ignored by the function.
Example:
In this example the padding hints change the behavior of an Evas box when layouting its children. See the full example.
See also:
evas_object_size_hint_padding_set()
Parameters:
[in]objThe evas object
[out]lInteger to specify left padding.
[out]rInteger to specify right padding.
[out]tInteger to specify top padding.
[out]bInteger to specify bottom padding.

Sets the hints for an object's padding space.

Since :
2.3
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
See also:
evas_object_size_hint_padding_get() for more information
Parameters:
[in]objThe evas object
[in]lInteger to specify left padding.
[in]rInteger to specify right padding.
[in]tInteger to specify top padding.
[in]bInteger to specify bottom padding.
void evas_object_size_hint_weight_get ( const Evas_Object obj,
double *  x,
double *  y 
)

Retrieves the hints for an object's weight.

Since :
2.3
Remarks:
Accepted values are zero or positive values. Some users might use this hint as a boolean, but some might consider it as a proportion, see documentation of possible users, which in Evas are the box and table smart objects.
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
Use NULL pointers on the hint components you're not interested in: they'll be ignored by the function.
Note:
If obj is invalid, then the hint components will be set with 0.0
See also:
evas_object_size_hint_weight_set() for an example
Parameters:
[in]objThe evas object
[out]xNonnegative double value to use as horizontal weight hint.
[out]yNonnegative double value to use as vertical weight hint.
void evas_object_size_hint_weight_set ( Evas_Object obj,
double  x,
double  y 
)

Sets the hints for an object's weight.

Since :
2.3
Remarks:
This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.
This is a hint on how a container object should resize a given child within its area. Containers may adhere to the simpler logic of just expanding the child object's dimensions to fit its own (see the EVAS_HINT_EXPAND helper weight macro) or the complete one of taking each child's weight hint as real weights to how much of its size to allocate for them in each axis. A container is supposed to, after normalizing the weights of its children (with weight hints), distribute the space it has to layout them by those factors -- most weighted children get larger in this process than the least ones.
Example:
In this example the weight hints change the behavior of an Evas box when layouting its children. See the full example.
Default weight hint values are 0.0, for both axis.
See also:
evas_object_size_hint_weight_get() for more information
Parameters:
[in]objThe evas object
[in]xNonnegative double value to use as horizontal weight hint.
[in]yNonnegative double value to use as vertical weight hint.