native-ui/native_ui/impl/gnome/window.py
2022-07-30 23:03:15 +02:00

24 lines
760 B
Python

from native_ui import abstract
from . import Gtk
from pathlib import Path
from typing import Any
platform = Path(__file__).parent.name
class Window(abstract.Window):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs, platform=platform)
def changed_gnome(self, property_name: str, index: int = None):
if "property_name" == "child":
self.native.set_child(self.child.build())
def called_gnome(self, property_name: str, res: Any, *args, **kwargs):
pass
def build_gnome(self, app: abstract.Application = None):
self.native = Gtk.ApplicationWindow(application=app)
if self.child is not None:
self.native.set_child(self.child.build())
return self.native