<commit_before>"
I am a fallback host space that is chosen if there are no other available and supported hosts.
"
Class {
	#name : #BlHeadlessHostSpace,
	#superclass : #Object,
	#traits : 'TBlHostSpace + TBlDebug',
	#classTraits : 'TBlHostSpace classTrait + TBlDebug classTrait',
	#instVars : [
		'eventFetcher',
		'host',
		'space',
		'position',
		'title'
	],
	#category : 'Bloc-Universe'
}

{ #category : #'window - properties' }
BlHeadlessHostSpace >> borderless [
	"Return true if underlying window is now borderless, false otherwise"
	<return: #Boolean>
	
	^ false
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> borderless: aBoolean [
	"Make host window borderless if true is given"
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> canvasExtent [
	"Return a window canvas size in user coordinates.
	This size may differ from the window size on high dpi (retina) screens.
	In most cases canvas is x2 larger than window in pixel on retina screens."
	<return: #Point>

	^ 0@0
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> close [
	"do nothing"
]

{ #category : #'host space - cursor' }
BlHeadlessHostSpace >> cursor: aCursor [
	"Change current cursor image/view to the given one"
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> densityDpi [
	"Return the screen density expressed as dots-per-inch"
	<return: #Number>
	
	^ 96.0
]

{ #category : #'host space - events' }
BlHeadlessHostSpace >> eventFetcher [
	"Return event fetcher used to enqueue events that should be
	processed in the beginning of every frame"
	<return: #BlHostEventFetcher>

	^ eventFetcher
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> fullscreen [
	"Return true if an underlying window is in fullscreen mode,
	false otherwise"
	<return: #Boolean>

	^ false
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> fullscreen: aBoolean [
	"Switch underlying window to fullscreen if true is given
	and exit fullscreen mode if false is given"
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> hide [
	"do nothing"
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> host [
	"Return a host that was used to create this host space"
	<return: #BlHost>

	^ host
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> host: aBlHost [
	"Assign a host that was used to create this host space"
	
	host := aBlHost
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> icon: aForm [
	"Change window's icon to the given one"
]

{ #category : #initialization }
BlHeadlessHostSpace >> initialize [
	super initialize.
	
	eventFetcher := BlHostEventFetcher new
]

{ #category : #'host space - testing' }
BlHeadlessHostSpace >> isVisible [
	"Return true if underlying window is shown, false otherwise.
	Note: If window was shown and then minimized it is still considered to be visible.
	Window can become invisible by asking it to hide"
	<return: #Boolean>

	^ false
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> maximize [
	"do nothing"
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> maximized [

	^ false
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> minimize [
	"do nothing"
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> minimized [

	^ false
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> open [
	"do nothing"
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> position [
	"Return window's position in screen coordinates"
	<return: #Point>
	
	^ position
]<commit_msg>implement needsRebuild in headless host<commit_after>"
I am a fallback host space that is chosen if there are no other available and supported hosts.
"
Class {
	#name : #BlHeadlessHostSpace,
	#superclass : #Object,
	#traits : 'TBlHostSpace + TBlDebug',
	#classTraits : 'TBlHostSpace classTrait + TBlDebug classTrait',
	#instVars : [
		'eventFetcher',
		'host',
		'space',
		'position',
		'title'
	],
	#category : 'Bloc-Universe'
}

{ #category : #'window - properties' }
BlHeadlessHostSpace >> borderless [
	"Return true if underlying window is now borderless, false otherwise"
	<return: #Boolean>
	
	^ false
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> borderless: aBoolean [
	"Make host window borderless if true is given"
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> canvasExtent [
	"Return a window canvas size in user coordinates.
	This size may differ from the window size on high dpi (retina) screens.
	In most cases canvas is x2 larger than window in pixel on retina screens."
	<return: #Point>

	^ 0@0
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> close [
	"do nothing"
]

{ #category : #'host space - cursor' }
BlHeadlessHostSpace >> cursor: aCursor [
	"Change current cursor image/view to the given one"
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> densityDpi [
	"Return the screen density expressed as dots-per-inch"
	<return: #Number>
	
	^ 96.0
]

{ #category : #'host space - events' }
BlHeadlessHostSpace >> eventFetcher [
	"Return event fetcher used to enqueue events that should be
	processed in the beginning of every frame"
	<return: #BlHostEventFetcher>

	^ eventFetcher
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> fullscreen [
	"Return true if an underlying window is in fullscreen mode,
	false otherwise"
	<return: #Boolean>

	^ false
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> fullscreen: aBoolean [
	"Switch underlying window to fullscreen if true is given
	and exit fullscreen mode if false is given"
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> hide [
	"do nothing"
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> host [
	"Return a host that was used to create this host space"
	<return: #BlHost>

	^ host
]

{ #category : #'host space - accessing' }
BlHeadlessHostSpace >> host: aBlHost [
	"Assign a host that was used to create this host space"
	
	host := aBlHost
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> icon: aForm [
	"Change window's icon to the given one"
]

{ #category : #initialization }
BlHeadlessHostSpace >> initialize [
	super initialize.
	
	eventFetcher := BlHostEventFetcher new
]

{ #category : #'host space - testing' }
BlHeadlessHostSpace >> isVisible [
	"Return true if underlying window is shown, false otherwise.
	Note: If window was shown and then minimized it is still considered to be visible.
	Window can become invisible by asking it to hide"
	<return: #Boolean>

	^ false
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> maximize [
	"do nothing"
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> maximized [

	^ false
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> minimize [
	"do nothing"
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> minimized [

	^ false
]

{ #category : #'host space - testing' }
BlHeadlessHostSpace >> needsRebuild [
	"Return true if window should be recreated after user saved and quit pharo"
	<return: #Boolean>
	
	^ false
]

{ #category : #'host space - displaying' }
BlHeadlessHostSpace >> open [
	"do nothing"
]

{ #category : #'window - properties' }
BlHeadlessHostSpace >> position [
	"Return window's position in screen coordinates"
	<return: #Point>
	
	^ position
]
{'fraction_non_alphanumeric': 0.11179707421822574, 'fraction_numerical': 0.00161052207757348, 'mean_word_length': 4.23314606741573, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 106, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3383341', 'n_tokens_mistral': 2421, 'n_tokens_neox': 2343, 'n_words': 802}