Coverage for src / ezqt_app / domain / ports / runtime_state_service.py: 100.00%

2 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-06 13:12 +0000

1# /////////////////////////////////////////////////////////////// 

2# DOMAIN.PORTS.RUNTIME_STATE_SERVICE - Runtime state port 

3# Project: ezqt_app 

4# /////////////////////////////////////////////////////////////// 

5 

6"""Protocol definitions for runtime state services.""" 

7 

8from __future__ import annotations 

9 

10# /////////////////////////////////////////////////////////////// 

11# IMPORTS 

12# /////////////////////////////////////////////////////////////// 

13# Standard library imports 

14from typing import Protocol 

15 

16 

17# /////////////////////////////////////////////////////////////// 

18# PROTOCOLS 

19# /////////////////////////////////////////////////////////////// 

20class RuntimeStateServiceProtocol(Protocol): 

21 """Technical contract for runtime state management.""" 

22 

23 def set_debug_mode(self, enabled: bool = True) -> None: 

24 """Enable or disable debug mode.""" 

25 

26 def set_verbose_mode(self, enabled: bool = True) -> None: 

27 """Enable or disable verbose mode.""" 

28 

29 def is_debug_mode(self) -> bool: 

30 """Return debug mode status.""" 

31 

32 def is_verbose_mode(self) -> bool: 

33 """Return verbose mode status.""" 

34 

35 def mark_app_initialized(self) -> None: 

36 """Mark application as initialized.""" 

37 

38 def mark_app_running(self) -> None: 

39 """Mark application as running.""" 

40 

41 def is_app_initialized(self) -> bool: 

42 """Return app initialized status.""" 

43 

44 def is_app_running(self) -> bool: 

45 """Return app running status.""" 

46 

47 def get_global_state(self) -> bool: 

48 """Return legacy window global state.""" 

49 

50 def set_global_state(self, state: bool) -> None: 

51 """Set legacy window global state.""" 

52 

53 def get_global_title_bar(self) -> bool: 

54 """Return legacy title bar status.""" 

55 

56 def set_global_title_bar(self, enabled: bool) -> None: 

57 """Set legacy title bar status."""