Skip to content

Commit

Permalink
Initial clean up of the startup of the display and the way the world …
Browse files Browse the repository at this point in the history
…uses the windows.
  • Loading branch information
tesonep committed Jun 25, 2019
1 parent f48cfb1 commit 444b3c8
Show file tree
Hide file tree
Showing 26 changed files with 424 additions and 363 deletions.
5 changes: 0 additions & 5 deletions src/Athens-Cairo/CairoLibrary.class.st
Expand Up @@ -8,11 +8,6 @@ Class {
#category : #'Athens-Cairo-Library'
}

{ #category : #'accessing platform' }
CairoLibrary >> macModuleName [
^ 'libcairo.2.dylib'
]

{ #category : #'accessing platform' }
CairoLibrary >> unix32ModuleName [
"On different flavors of linux the path to library may differ
Expand Down
1 change: 0 additions & 1 deletion src/BaselineOfMorphic/BaselineOfMorphic.class.st
Expand Up @@ -332,7 +332,6 @@ BaselineOfMorphic >> postload: loader package: packageSpec [
UIManager default: MorphicUIManager new.

World displayWorldSafely.
World assuredCanvas.

UIManager default uiProcess resume.
PharoDarkTheme beCurrent.
Expand Down
5 changes: 0 additions & 5 deletions src/FreeType/FT2FFILibrary.class.st
Expand Up @@ -136,11 +136,6 @@ FT2FFILibrary class >> translateErrorCode: aCode [
^ ErrorCodeTable at: aCode ifAbsent: [ 'Unknown Error code' ].
]

{ #category : #'accessing platform' }
FT2FFILibrary >> macModuleName [
^ 'libfreetype.dylib'
]

{ #category : #'accessing platform' }
FT2FFILibrary >> unixModuleName [
^ 'libfreetype.so.6'
Expand Down
5 changes: 0 additions & 5 deletions src/Graphics-Display Objects/Cursor.class.st
Expand Up @@ -980,11 +980,6 @@ Cursor class >> square [
^SquareCursor
]

{ #category : #'system startup' }
Cursor class >> startUp [
self currentCursor: self currentCursor
]

{ #category : #constants }
Cursor class >> target [
"Answer the instance of me that is the shape of a gunsight."
Expand Down
17 changes: 1 addition & 16 deletions src/Graphics-Display Objects/DisplayScreen.class.st
Expand Up @@ -178,21 +178,6 @@ DisplayScreen class >> setWindowTitle: aTitle [
self refreshHostWindowTitle
]

{ #category : #'system startup' }
DisplayScreen class >> shutDown [
"Minimize Display memory saved in image"
Display shutDown.
]

{ #category : #'system startup' }
DisplayScreen class >> startUp [
"DisplayScreen startUp"

Display setExtent: self actualScreenSize depth: Display nativeDepth.
Display beDisplay.
self refreshHostWindowTitle
]

{ #category : #displaying }
DisplayScreen >> addExtraRegion: aRectangle for: regionDrawer [
"Register the given rectangle as a region which is drawn by the specified region drawer. The region will be excluded from any updates when #forceDamageToScreen: is called. Note that the rectangle is only valid for a single update cycle; once #forceDamageToScreen: has been called, the region drawer and its region are being removed from the list"
Expand Down Expand Up @@ -410,7 +395,7 @@ DisplayScreen >> fullscreen [
DisplayScreen >> fullscreen: aBoolean [

Display fullscreenMode: (LastScreenModeSelected := aBoolean).
DisplayScreen checkForNewScreenSize.
self currentWorld worldState worldRenderer checkForNewScreenSize.

]

Expand Down
8 changes: 0 additions & 8 deletions src/Graphics-Display Objects/DummyUIManager.extension.st
@@ -1,13 +1,5 @@
Extension { #name : #DummyUIManager }

{ #category : #'*Graphics-Display Objects' }
DummyUIManager >> checkForNewDisplaySize [

Display extent = DisplayScreen actualScreenSize ifTrue: [^ self].
DisplayScreen startUp.

]

{ #category : #'*Graphics-Display Objects' }
DummyUIManager >> newDisplayDepthNoRestore: pixelSize [

Expand Down
44 changes: 44 additions & 0 deletions src/Morphic-Core/AbstractWorldRenderer.class.st
@@ -0,0 +1,44 @@
Class {
#name : #AbstractWorldRenderer,
#superclass : #Object,
#instVars : [
'world'
],
#category : #'Morphic-Core-Worlds'
}

{ #category : #accessing }
AbstractWorldRenderer class >> forWorld: aWorld [

^ self new
world: aWorld;
yourself
]

{ #category : #accessing }
AbstractWorldRenderer class >> priority [

^ 0
]

{ #category : #activation }
AbstractWorldRenderer >> activate [

self subclassResponsibility
]

{ #category : #activation }
AbstractWorldRenderer >> deactivate [

self subclassResponsibility
]

{ #category : #accessing }
AbstractWorldRenderer >> world [
^ world
]

{ #category : #accessing }
AbstractWorldRenderer >> world: anObject [
world := anObject
]
11 changes: 0 additions & 11 deletions src/Morphic-Core/MorphicCoreUIManager.class.st
Expand Up @@ -10,17 +10,6 @@ Class {
#category : #'Morphic-Core-Support'
}

{ #category : #'ui requests' }
MorphicCoreUIManager >> checkForNewDisplaySize [

"Check whether the screen size has changed and if so take appropriate actions"

Display extent = DisplayScreen actualScreenSize ifTrue: [^ Display].
DisplayScreen startUp.
self currentWorld restoreMorphicDisplay.

]

{ #category : #'ui requests' }
MorphicCoreUIManager >> currentWorld [

Expand Down
91 changes: 91 additions & 0 deletions src/Morphic-Core/NullWorldRenderer.class.st
@@ -0,0 +1,91 @@
Class {
#name : #NullWorldRenderer,
#superclass : #AbstractWorldRenderer,
#category : #'Morphic-Core-Worlds'
}

{ #category : #accessing }
NullWorldRenderer class >> priority [

^ 0
]

{ #category : #activation }
NullWorldRenderer >> activate [
]

{ #category : #operations }
NullWorldRenderer >> activateCursor: aCursor withMask: maskForm [

"We don't activate nothing"
]

{ #category : #accessing }
NullWorldRenderer >> actualScreenSize [

^ 240@120
]

{ #category : #accessing }
NullWorldRenderer >> canvas [

^ nil
]

{ #category : #accessing }
NullWorldRenderer >> canvas: x [

]

{ #category : #'display box access' }
NullWorldRenderer >> checkForNewScreenSize [

"Do nothing"
]

{ #category : #activation }
NullWorldRenderer >> deactivate [
]

{ #category : #operations }
NullWorldRenderer >> deferUpdates: aValue [

^ aValue value
]

{ #category : #operations }
NullWorldRenderer >> displayWorldState: aWorldState ofWorld: aWorld submorphs: submorphs [

"Do Nothing"
]

{ #category : #operations }
NullWorldRenderer >> doDeferredUpdatingFor: aWorld [

"Do Nothing"
]

{ #category : #operations }
NullWorldRenderer >> forceDamageToScreen: allDamage [

"Do Nothing"

]

{ #category : #operations }
NullWorldRenderer >> forceDisplayUpdate [

" Do Nothing "
]

{ #category : #'display box access' }
NullWorldRenderer >> usableArea [

^ self actualScreenSize
]

{ #category : #'display box access' }
NullWorldRenderer >> viewBox [

^ self actualScreenSize
]

0 comments on commit 444b3c8

Please sign in to comment.