#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# Support module generated by PAGE version 7.2d
#  in conjunction with Tcl version 8.6
#    Jan 25, 2022 08:09:03 AM PST  platform: Linux

import sys
import tkinter as tk
import tkinter.ttk as ttk
from tkinter.constants import *

import fullscreen

def main(*args):
    '''Main entry point for the application.'''
    global root
    root = tk.Tk()
    root.protocol( 'WM_DELETE_WINDOW' , sys.exit)
    # Creates a toplevel widget.
    global _top1, _w1
    _top44 = root
    _w1 = fullscreen.Toplevel1(_top44)
    init(_top44, _w1)
    root.mainloop()

def init(top, gui, *args, **kwargs):
    global w, top_level, root
    global fullScreenState
    w = gui
    top_level = top
    top_level = top
    top_level.attributes('-fullscreen', True)
    fullScreenState = True
    # The binding for F11 and ESC could be either here or in the GUI
    # module.
    #top_level.bind("<F11>", toggleFullScreen)
    #top_level.bind("<Escape>", quitFullScreen)

def toggleFullScreen(event):
    global fullScreenState
    fullScreenState = not fullScreenState
    top_level.attributes("-fullscreen", fullScreenState)

def quitFullScreen(event):
    global fullScreenState
    fullScreenState = False
    top_level.attributes("-fullscreen", fullScreenState)

def about(*args):
    print('fullscreen_support.about')
    sys.stdout.flush()

def help(*args):
    print('fullscreen_support.help')
    sys.stdout.flush()

def open():
    print('fullscreen_support.open')
    sys.stdout.flush()

def quit(*args):
    print('fullscreen_support.quit')
    sys.stdout.flush()
    sys.exit()

def full_screen():
    print('fullscreen_support.full_screen')
    sys.stdout.flush()
    global fullScreenState
    fullScreenState = True
    top_level.attributes("-fullscreen", fullScreenState)

def partial_screen(*args):
    print('fullscreen_support.partial_screen')
    sys.stdout.flush()
    global fullScreenState
    fullScreenState = False
    top_level.attributes("-fullscreen", fullScreenState)


def toggle_screen_fill(*args):
    print('fullscreen_support.toggle_screen_fill')
    sys.stdout.flush()
    global fullScreenState
    fullScreenState = not fullScreenState
    top_level.attributes("-fullscreen", fullScreenState)

def quitFullScreen(event):
    global fullScreenState
    fullScreenState = False
    top_level.attributes("-fullscreen", fullScreenState)

def about(*args):
    print('fullscreen_support.about')
    sys.stdout.flush()

def help(*args):
    print('fullscreen_support.help')
    sys.stdout.flush()

def open():
    print('fullscreen_support.open')
    sys.stdout.flush()

def destroy_window():
    # Function which closes the window.
    global top_level
    top_level.destroy()
    top_level = None


if __name__ == '__main__':
    fullscreen.start_up()




