A doubly-linked circular list for keeping track of windows that can be focused. More...
Public Member Functions | |
def | __init__ |
Create an empty list. | |
def | add |
Insert an item at the beginning of the list. More... | |
def | remove |
Remove specified item from list. More... | |
def | head |
Return list's first element or None if list is empty. | |
def | forward |
Move head to next element. More... | |
def | backward |
Move head to previous element. More... | |
A doubly-linked circular list for keeping track of windows that can be focused.
This class implements a doubly-linked circular list that is meant to be used by the window manager for keeping track of the list of top-level windows that can be focused. The head of this list will always be taken to be the currently focused window.
def minx.core.focus_list.focus_list.add | ( | self, | |
item | |||
) |
Insert an item at the beginning of the list.
item | The item to be added. |
This method inserts item (which can be of any type) at the beginning of the list, taking care to maintain circularity.
def minx.core.focus_list.focus_list.backward | ( | self) |
Move head to previous element.
This method is meant to allow moving the input focus from the current top-level window to the previous one in the window manager's list of windows that can be focused.
If the focus list is empty, this function does nothing.
def minx.core.focus_list.focus_list.forward | ( | self) |
Move head to next element.
This method is meant to allow moving the input focus from the current top-level window to the next one in the window manager's list of windows that can be focused.
If the focus list is empty, this function does nothing.
def minx.core.focus_list.focus_list.remove | ( | self, | |
item | |||
) |
Remove specified item from list.
item | List item to be removed. |
This method searches the list for item and, if it is present, removes it, taking care to maintain circularity. If item is the first element in the list, the second element will become the list's new head after the removal.