Public Member Functions | Static Public Member Functions
efl::gfx::base Struct Reference

Class base. More...

Public Member Functions

 base (Eo *eo)
 Eo Constructor. More...
 
 base (std::nullptr_t)
 nullptr_t Constructor. More...
 
 base (base const &other)
 Copy Constructor.
 
void position_get (int *x_, int *y_) const
 Retrieves the position of the given Evas object. More...
 
void position_set (int x_, int y_) const
 Move the given Evas object to the given location inside its canvas' viewport. More...
 
void size_get (int *w_, int *h_) const
 Retrieves the (rectangular) size of the given Evas object. More...
 
void size_set (int w_, int h_) const
 Changes the size of the given Evas object. More...
 
void color_get (int *r_, int *g_, int *b_, int *a_) const
 Retrieves the general/main color of the given Evas object. More...
 
void color_set (int r_, int g_, int b_, int a_) const
 Sets the general/main color of the given Evas object to the given one. More...
 
bool color_part_get (::efl::eina::string_view part_, int *r_, int *g_, int *b_, int *a_) const
 Retrieves a specific color of the given Evas object. More...
 
bool color_part_set (::efl::eina::string_view part_, int r_, int g_, int b_, int a_) const
 Sets a specifc color of the given Efl.Gfx.Base object to the given one. More...
 
bool visible_get () const
 Retrieves whether or not the given Evas object is visible. More...
 
void visible_set (bool v_) const
 Makes the given Evas object visible or invisible. More...
 
 base (::efl::eo::parent_type _p)
 Constructs a new efl::gfx::base object. More...
 
- Public Member Functions inherited from efl::eo::concrete
 concrete (Eo *eo)
 Class constructor. More...
 
 concrete ()
 Default constructor. More...
 
 ~concrete ()
 Class destructor.
 
 concrete (concrete const &other)
 
 concrete (concrete &&other)
 
concreteoperator= (concrete const &other)
 Assignment operator.
 
concreteoperator= (concrete &&other)
 
Eo_eo_ptr () const
 Return a pointer to the EO Object stored in this instance. More...
 
Eo_release ()
 Releases the reference from this concrete object and return the pointer to the EO Object stored in this instance. More...
 
void _reset (Eo *_ptr=nullptr)
 Reset the current pointer to reference a new Eo object.
 
int ref_get () const
 Get the reference count of this object. More...
 
void parent_set (concrete parent)
 Set the parent of this object. More...
 
eina::optional< concreteparent_get ()
 Get the parent of this object. More...
 
Eo_Dbg_Info dbg_info_get ()
 Get debug information of this object. More...
 
 operator bool () const
 

Static Public Member Functions

static Eo_Class const * _eo_class ()
 

Additional Inherited Members

- Protected Attributes inherited from efl::eo::concrete
Eo_eo_raw
 The opaque EO Object.
 

Detailed Description

Class base.

Constructor & Destructor Documentation

efl::gfx::base::base ( ::efl::eo::parent_type  _p)
inlineexplicit

Constructs a new efl::gfx::base object.

Constructs a new efl::gfx::base object. If you want this object to be a child of another Eo object, use an efl::eo::parent expression, like the example.

Example:

efl::gfx::base my_base(efl::eo::parent = parent_object);
See also
base(Eo* eo)
efl::gfx::base::base ( Eo eo)
inlineexplicit

Eo Constructor.

Constructs the object from an Eo* pointer stealing its ownership.

Parameters
eoThe Eo object pointer.
efl::gfx::base::base ( std::nullptr_t  )
inlineexplicit

nullptr_t Constructor.

Constructs an empty (null) object.

Member Function Documentation

void efl::gfx::base::position_get ( int *  x_,
int *  y_ 
) const

Retrieves the position of the given Evas object.

Parameters
xin
yin
void efl::gfx::base::position_set ( int  x_,
int  y_ 
) const

Move the given Evas object to the given location inside its canvas' viewport.

Parameters
xin
yin
void efl::gfx::base::size_get ( int *  w_,
int *  h_ 
) const

Retrieves the (rectangular) size of the given Evas object.

Parameters
win
hin
void efl::gfx::base::size_set ( int  w_,
int  h_ 
) const

Changes the size of the given Evas object.

Parameters
win
hin
bool efl::gfx::base::color_part_get ( ::efl::eina::string_view  part_,
int *  r_,
int *  g_,
int *  b_,
int *  a_ 
) const

Retrieves a specific color of the given Evas object.

Retrieves a specific color's RGB component (and alpha channel) values, which range from 0 to 255. For the alpha channel, which defines the object's transparency level, 0 means totally transparent, while 255 means opaque. These color values are premultiplied by the alpha value.

The “main“ color being mapped to NULL.

Usually you’ll use this attribute for text and rectangle objects, where the “main” color is their unique one. If set for objects which themselves have colors, like the images one, those colors get modulated by this one.

Note
Use NULL pointers on the components you're not interested in: they'll be ignored by the function.
Parameters
rThe red component of the given color.
gThe green component of the given color.
bThe blue component of the given color.
aThe alpha component of the given color.
bool efl::gfx::base::color_part_set ( ::efl::eina::string_view  part_,
int  r_,
int  g_,
int  b_,
int  a_ 
) const

Sets a specifc color of the given Efl.Gfx.Base object to the given one.

See also
evas_object_color_get() (for an example)
Note
These color values are expected to be premultiplied by a.
Parameters
rThe red component of the given color.
gThe green component of the given color.
bThe blue component of the given color.
aThe alpha component of the given color.
bool efl::gfx::base::visible_get ( ) const

Retrieves whether or not the given Evas object is visible.

Parameters
vEINA_TRUE if to make the object visible, EINA_FALSE otherwise
void efl::gfx::base::visible_set ( bool  v_) const

Makes the given Evas object visible or invisible.

Parameters
vEINA_TRUE if to make the object visible, EINA_FALSE otherwise