void CreateNodeContainerPair(screen_info *Screen, tree_node *LeftNode, tree_node *RightNode, int SplitMode) { if(SplitMode == 1) { CreateNodeContainer(Screen, LeftNode, 1); CreateNodeContainer(Screen, RightNode, 2); } else { CreateNodeContainer(Screen, LeftNode, 3); CreateNodeContainer(Screen, RightNode, 4); } }
tree_node *CreateLeafNode(screen_info *Screen, tree_node *Parent, int WindowID, int ContainerType) { tree_node *Leaf = (tree_node*) malloc(sizeof(tree_node)); Leaf->Parent = Parent; Leaf->WindowID = WindowID; CreateNodeContainer(Screen, Leaf, ContainerType); Leaf->LeftChild = NULL; Leaf->RightChild = NULL; return Leaf; }
tree_node *CreateLeafNode(ax_display *Display, tree_node *Parent, uint32_t WindowID, container_type Type) { tree_node *Leaf = (tree_node*) malloc(sizeof(tree_node)); memset(Leaf, 0, sizeof(tree_node)); Leaf->Parent = Parent; Leaf->WindowID = WindowID; Leaf->Type = NodeTypeTree; CreateNodeContainer(Display, Leaf, Type); Leaf->LeftChild = NULL; Leaf->RightChild = NULL; return Leaf; }