fix old todos

master
Tony Crisci 7 years ago
parent a514fee1b9
commit eca4468c2c

@ -91,12 +91,10 @@ struct sway_container {
} events; } events;
}; };
// TODO make private and use the container-specific create functions
struct sway_container *container_create(enum sway_container_type type); struct sway_container *container_create(enum sway_container_type type);
const char *container_type_to_str(enum sway_container_type type); const char *container_type_to_str(enum sway_container_type type);
// TODO only one container create function and pass the type?
struct sway_container *container_output_create( struct sway_container *container_output_create(
struct sway_output *sway_output); struct sway_output *sway_output);
@ -123,16 +121,13 @@ struct sway_container *container_workspace_create(struct sway_container *output,
* or a container container and are rendered in the order and structure of * or a container container and are rendered in the order and structure of
* how they are attached to the tree. * how they are attached to the tree.
*/ */
// TODO view containers should be created in a detached state.
struct sway_container *container_view_create( struct sway_container *container_view_create(
struct sway_container *sibling, struct sway_view *sway_view); struct sway_container *sibling, struct sway_view *sway_view);
// TODO don't return the parent on destroy
struct sway_container *container_destroy(struct sway_container *container); struct sway_container *container_destroy(struct sway_container *container);
struct sway_container *container_close(struct sway_container *container); struct sway_container *container_close(struct sway_container *container);
// TODO rename to container_descendants_for_each()
void container_descendants(struct sway_container *root, void container_descendants(struct sway_container *root,
enum sway_container_type type, enum sway_container_type type,
void (*func)(struct sway_container *item, void *data), void *data); void (*func)(struct sway_container *item, void *data), void *data);
@ -147,7 +142,6 @@ struct sway_container *container_find(struct sway_container *container,
/** /**
* Finds a parent container with the given struct sway_containerype. * Finds a parent container with the given struct sway_containerype.
*/ */
// TODO rename to container_parent_of_type()
struct sway_container *container_parent(struct sway_container *container, struct sway_container *container_parent(struct sway_container *container,
enum sway_container_type type); enum sway_container_type type);

@ -29,26 +29,20 @@ struct sway_root {
void layout_init(void); void layout_init(void);
// TODO move to tree.h
void container_add_child(struct sway_container *parent, void container_add_child(struct sway_container *parent,
struct sway_container *child); struct sway_container *child);
// TODO move to tree.h
struct sway_container *container_add_sibling(struct sway_container *parent, struct sway_container *container_add_sibling(struct sway_container *parent,
struct sway_container *child); struct sway_container *child);
// TODO move to tree.h
struct sway_container *container_remove_child(struct sway_container *child); struct sway_container *container_remove_child(struct sway_container *child);
// TODO PRIVATE in tree.h
struct sway_container *container_replace_child(struct sway_container *child, struct sway_container *container_replace_child(struct sway_container *child,
struct sway_container *new_child); struct sway_container *new_child);
// TODO move to layout.c
struct sway_container *container_set_layout(struct sway_container *container, struct sway_container *container_set_layout(struct sway_container *container,
enum sway_container_layout layout); enum sway_container_layout layout);
// TODO move to tree.h
void container_move_to(struct sway_container* container, void container_move_to(struct sway_container* container,
struct sway_container* destination); struct sway_container* destination);
@ -58,17 +52,14 @@ void container_move(struct sway_container *container,
enum sway_container_layout container_get_default_layout( enum sway_container_layout container_get_default_layout(
struct sway_container *con); struct sway_container *con);
// TODO move to output.c
void container_sort_workspaces(struct sway_container *output); void container_sort_workspaces(struct sway_container *output);
void arrange_windows(struct sway_container *container, void arrange_windows(struct sway_container *container,
double width, double height); double width, double height);
// TODO move to container.h
struct sway_container *container_get_in_direction(struct sway_container struct sway_container *container_get_in_direction(struct sway_container
*container, struct sway_seat *seat, enum movement_direction dir); *container, struct sway_seat *seat, enum movement_direction dir);
// TODO move to tree.h
struct sway_container *container_split(struct sway_container *child, struct sway_container *container_split(struct sway_container *child,
enum sway_container_layout layout); enum sway_container_layout layout);

Loading…
Cancel
Save