|
Etk_Toplevel
Detailed Description
A toplevel widget is a widget that can't have a parent (such as a window or an embed widget).
A toplevel widget has also to provide the Evas that will be used by all its children.
You can use the toplevel parent of a widget to change the shape of the mouse pointer with etk_toplevel_pointer_push() and etk_toplevel_pointer_pop().
For example, to change the mouse pointer when the mouse is above a button:
void _button_entered_cb(Etk_Widget *widget, void *data)
{
Etk_Toplevel *toplevel;
if (!(toplevel = etk_widget_toplevel_parent_get(widget)))
return;
etk_toplevel_pointer_push(toplevel, ETK_POINTER_MOVE);
}
void _button_left_cb(Etk_Widget *widget, void *data)
{
Etk_Toplevel *toplevel;
if (!(toplevel = etk_widget_toplevel_parent_get(widget)))
return;
etk_toplevel_pointer_pop(toplevel, ETK_POINTER_MOVE);
}
etk_signal_connect("entered", ETK_OBJECT(button), ETK_CALLBACK(_button_entered_cb), NULL);
etk_signal_connect("left", ETK_OBJECT(button), ETK_CALLBACK(_button_left_cb), NULL);
- Object Hierarchy:
-
- Properties:
- "evas": The Evas of the toplevel widget
Type: Pointer (Evas *)Access: Read OnlyDefault Value: NULL
- "focused-widget": The focused widget of the toplevel widget
Type: Pointer (Etk_Widget *)Access: Read/WriteDefault Value: NULL
|
Data Structures |
struct | Etk_Toplevel |
| [Widget] A widget that can't have a parent More...
|
Defines |
#define | ETK_TOPLEVEL_TYPE (etk_toplevel_type_get()) |
#define | ETK_TOPLEVEL(obj) (ETK_OBJECT_CAST((obj), ETK_TOPLEVEL_TYPE, Etk_Toplevel)) |
#define | ETK_IS_TOPLEVEL(obj) (ETK_OBJECT_CHECK_TYPE((obj), ETK_TOPLEVEL_TYPE)) |
Enumerations |
enum | Etk_Pointer_Type |
| The different types of mouse pointer. More...
|
Functions |
Evas * | etk_toplevel_evas_get (Etk_Toplevel *toplevel) |
| Gets the evas of the toplevel widget.
|
void | etk_toplevel_evas_position_get (Etk_Toplevel *toplevel, int *x, int *y) |
| Gets the position of the toplevel widget, relative to the top left corner of the evas where it is drawn.
|
void | etk_toplevel_screen_position_get (Etk_Toplevel *toplevel, int *x, int *y) |
| Gets the position of the toplevel widget, relative to the top left corner of the screen.
|
void | etk_toplevel_size_get (Etk_Toplevel *toplevel, int *w, int *h) |
| Gets the size of the toplevel widget.
|
void | etk_toplevel_focused_widget_set (Etk_Toplevel *toplevel, Etk_Widget *widget) |
| Sets the focused widget of the toplevel widget. If you want to focus a widget, use etk_widget_focus() rather.
|
Etk_Widget * | etk_toplevel_focused_widget_get (Etk_Toplevel *toplevel) |
| Gets the focused widget of the toplevel widget.
|
Etk_Widget * | etk_toplevel_focused_widget_prev_get (Etk_Toplevel *toplevel) |
| Gets the previous widget to focus.
|
Etk_Widget * | etk_toplevel_focused_widget_next_get (Etk_Toplevel *toplevel) |
| Gets the next widget to focus.
|
void | etk_toplevel_pointer_push (Etk_Toplevel *toplevel, Etk_Pointer_Type pointer_type) |
| Pushs a pointer type on the pointer stack. It will change the pointer shape.
|
void | etk_toplevel_pointer_pop (Etk_Toplevel *toplevel, Etk_Pointer_Type pointer_type) |
| Pops out of the pointer stack the first pointer of the stack whose type corresponds to pointer_type. It will change the pointer shape if the pointer to pop out is the one currently on the top of the stack.
|
Eina_List * | etk_toplevel_widgets_get (void) |
| Gets a list of all the created toplevel widgets.
|
Define Documentation
#define ETK_TOPLEVEL_TYPE (etk_toplevel_type_get()) |
Gets the type of a toplevel widget
#define ETK_TOPLEVEL |
( |
obj |
|
) |
(ETK_OBJECT_CAST((obj), ETK_TOPLEVEL_TYPE, Etk_Toplevel)) |
#define ETK_IS_TOPLEVEL |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_TOPLEVEL_TYPE)) |
Enumeration Type Documentation
The different types of mouse pointer.
Function Documentation
Gets the evas of the toplevel widget.
- Parameters:
-
| toplevel | a toplevel widget |
- Returns:
- Returns the evas of the toplevel widget
void etk_toplevel_evas_position_get |
( |
Etk_Toplevel * |
toplevel, |
|
|
int * |
x, |
|
|
int * |
y | |
|
) |
| | |
Gets the position of the toplevel widget, relative to the top left corner of the evas where it is drawn.
- Parameters:
-
| toplevel | a toplevel widget |
| x | the location where to store the x evas position of the toplevel widget |
| y | the location where to store the y evas position of the toplevel widget |
void etk_toplevel_screen_position_get |
( |
Etk_Toplevel * |
toplevel, |
|
|
int * |
x, |
|
|
int * |
y | |
|
) |
| | |
Gets the position of the toplevel widget, relative to the top left corner of the screen.
- Parameters:
-
| toplevel | a toplevel widget |
| x | the location where to store the x screen position of the toplevel widget |
| y | the location where to store the y screen position of the toplevel widget |
void etk_toplevel_size_get |
( |
Etk_Toplevel * |
toplevel, |
|
|
int * |
w, |
|
|
int * |
h | |
|
) |
| | |
Gets the size of the toplevel widget.
- Parameters:
-
| toplevel | a toplevel widget |
| w | the location where to store the width of the toplevel widget |
| h | the location where to store the height of the toplevel widget |
Sets the focused widget of the toplevel widget. If you want to focus a widget, use etk_widget_focus() rather.
- Parameters:
-
| toplevel | a toplevel widget |
| widget | the widget to set as focused |
- Note:
- This function is mainly used in widget implementations, you usually don't have to call it yourself
Gets the focused widget of the toplevel widget.
- Parameters:
-
| toplevel | a toplevel widget |
- Returns:
- Returns the focused widget of the toplevel widget
Gets the previous widget to focus.
- Parameters:
-
| toplevel | a toplevel widget |
- Returns:
- Returns the previous widget to focus
- Note:
- This function is mainly used in widget implementations, you usually don't have to call it yourself
Gets the next widget to focus.
- Parameters:
-
| toplevel | a toplevel widget |
- Returns:
- Returns the next widget to focus
- Note:
- This function is mainly used in widget implementations, you usually don't have to call it yourself
Pushs a pointer type on the pointer stack. It will change the pointer shape.
- Parameters:
-
| toplevel | a toplevel widget |
| pointer_type | the type of pointer to push on the stack |
Pops out of the pointer stack the first pointer of the stack whose type corresponds to pointer_type. It will change the pointer shape if the pointer to pop out is the one currently on the top of the stack.
- Parameters:
-
| toplevel | a toplevel widget |
| pointer_type | the type of pointer to pop out of the stack. -1 to pop the top pointer of the stack |
Eina_List * etk_toplevel_widgets_get |
( |
void |
|
) |
|
Gets a list of all the created toplevel widgets.
- Returns:
- Returns a list of all the created toplevel widgets
- Note:
- This list should not be modified or freed
|
|