#
#   Python GUI - Macintosh - Dummy windows and grafports
#

from Carbon.Windows import kPlainWindowClass
from Carbon.Win import CreateNewWindow

# The current port is set to the following window when a
# canvas is focused that does not currently have a grafport,
# e.g. a component that is not contained in a window.

_mac_dummy_window = CreateNewWindow(kPlainWindowClass, 0, (0, 0, 0, 0))

# The following grafport is used when something needs to be done
# that requires a grafport but doesn't result in any drawing, to
# avoid disturbing the state of the current grafport.

_mac_dummy_port = _mac_dummy_window.GetWindowPort()
