added state changes to declare layout either as user updateable or not
This commit is contained in:
parent
2f5e17ba5e
commit
24129147c9
9
gui.c
9
gui.c
@ -3487,6 +3487,15 @@ gui_layout_set_size(struct gui_layout *layout, gui_size width, gui_size height)
|
||||
layout->height = height;
|
||||
}
|
||||
|
||||
void
|
||||
gui_layout_set_state(struct gui_layout *layout, gui_uint state)
|
||||
{
|
||||
GUI_ASSERT(layout);
|
||||
if (!layout) return;
|
||||
if (state) layout->flags |= GUI_LAYOUT_INACTIVE;
|
||||
else layout->flags &= (gui_flags)~GUI_LAYOUT_INACTIVE;
|
||||
}
|
||||
|
||||
void
|
||||
gui_layout_slot(struct gui_layout *layout, enum gui_layout_slot_index slot,
|
||||
enum gui_layout_format format, gui_size count)
|
||||
|
7
gui.h
7
gui.h
@ -2148,6 +2148,11 @@ struct gui_layout_slot {
|
||||
/* panel filling layout */
|
||||
};
|
||||
|
||||
enum gui_layout_state {
|
||||
GUI_LAYOUT_DEACTIVATED,
|
||||
GUI_LAYOUT_ACTIVED
|
||||
};
|
||||
|
||||
enum gui_layout_flags {
|
||||
GUI_LAYOUT_INACTIVE = 0x01,
|
||||
/* tiled layout is inactive and cannot be updated by the user */
|
||||
@ -2171,6 +2176,8 @@ void gui_layout_init(struct gui_layout*, const struct gui_layout_config*,
|
||||
/* initializes the layout with given slot ratio and size */
|
||||
void gui_layout_set_size(struct gui_layout*, gui_size width, gui_size height);
|
||||
/* updates the size of the complete layout */
|
||||
void gui_layout_set_state(struct gui_layout*, gui_uint state);
|
||||
/* updates the state of the layout */
|
||||
void gui_layout_slot(struct gui_layout*, enum gui_layout_slot_index,
|
||||
enum gui_layout_format, gui_size panel_count);
|
||||
/* activates a layout slot with number of panels and filling format*/
|
||||
|
Loading…
Reference in New Issue
Block a user