win_magnification._objects

@MaxBQb

Aug 11, 2023

Internal module
Only use of WinMagnificationAPI allowed
class MatrixWrapper(datasource: Optional[DataSource[LM]] = None)[source]

Bases: Matrix, WrappedField[LM], Generic[LM]

Observable matrix wrapper

class Vector2(datasource: Optional[DataSource[Tuple[float, float]]] = None)[source]

Bases: WrappedField[Tuple[float, float]]

Pair of horizontal and vertical components

x: float
Horizontal component
Accessors: Get Set Delete
y: float
Vertical component
Accessors: Get Set Delete
property same: Optional[float]
Get/set same value from/to (x, y)
Or None if values differs
Accessors: Get Set
class TransformScale(datasource: Optional[DataSource[Tuple[float, float]]] = None)[source]

Bases: Vector2

Magnifier window scale (horizontal, vertical)

Parameter wrapper

This is wrapper for argument of complex winapi function, so at the time this property accessed the real value is already retrieved. Any changes made for this property, or its inner properties are immediately update real value. To apply changes at once you may use WrappedField.batch(). Also you may use raw which is equivalent of change all inner fields at once

Note

Default value available for this field.
Also all values of this field can be reset() at once
class TransformOffset(datasource: Optional[DataSource[Tuple[float, float]]] = None)[source]

Bases: Vector2

Magnifier window target offset (x , y ) from upper-left corner of magnifier screen

Parameter wrapper

This is wrapper for argument of complex winapi function, so at the time this property accessed the real value is already retrieved. Any changes made for this property, or its inner properties are immediately update real value. To apply changes at once you may use WrappedField.batch(). Also you may use raw which is equivalent of change all inner fields at once

Note

Default value available for this field.
Also all values of this field can be reset() at once
class FullscreenOffsetWrapper(datasource: Optional[DataSource[Tuple[int, int]]] = None)[source]

Bases: WrappedField[Tuple[int, int]]

Fullscreen magnification target offset
Relative to the upper-left corner of the primary monitor
Parameter wrapper

This is wrapper for argument of complex winapi function, so at the time this property accessed the real value is already retrieved. Any changes made for this property, or its inner properties are immediately update real value. To apply changes at once you may use WrappedField.batch(). Also you may use raw which is equivalent of change all inner fields at once

Note

Default value available for this field.
Also all values of this field can be reset() at once
x: int
Horizontal offset component
Starts from upper-left corner
Accessors: Get Set Delete
y: int
Vertical offset component
Starts from upper-left corner
Accessors: Get Set Delete
property same: Optional[int]
Get/set same value from/to (x, y)
Or None if values differs
Accessors: Get Set
class RectangleWrapper(datasource: Optional[_utils.DataSource[types.Rectangle]] = None)[source]

Bases: WrappedField[types.Rectangle]

Pair of two points (start , end )

Parameter wrapper

This is wrapper for argument of complex winapi function, so at the time this property accessed the real value is already retrieved. Any changes made for this property, or its inner properties are immediately update real value. To apply changes at once you may use WrappedField.batch(). Also you may use raw which is equivalent of change all inner fields at once

Note

Default value available for this field.
Also all values of this field can be reset() at once
left: int
x-component of start point
Accessors: Get Set Delete
top: int
y-component of start point
Accessors: Get Set Delete
right: int
x-component of end point
Accessors: Get Set Delete
bottom: int
y-component of end point
Accessors: Get Set Delete
property start: Tuple[int, int]
Get/set value from/to (left, top)
Accessors: Get Set
property start_same: Optional[int]
Get/set same value from/to (left, top)
Or None if values differs
Accessors: Get Set
property end: Tuple[int, int]
Get/set value from/to (right, bottom)
Accessors: Get Set
property end_same: Optional[int]
Get/set same value from/to (right, bottom)
Or None if values differs
Accessors: Get Set
property same: Optional[int]
Get/set same value from/to (left, top, right, bottom)
Or None if values differs
Accessors: Get Set
class SourceRectangleWrapper(datasource: Optional[_utils.DataSource[types.Rectangle]] = None)[source]

Bases: RectangleWrapper

Source area, to get origin pixels from

Function wrapper

This is wrapper for complex winapi function, so each time inner property accessed it will retrieve real values by calling this function, which can be used to change some parameters independently of others, to get/set a couple of values at once use WrappedField.batch(), also you may use raw, it works just like direct winapi function call.

Note

Default value available for this field.
Also all values of this field can be reset() at once
class ColorMatrixWrapper(datasource: Optional[DataSource[LM]] = None)[source]

Bases: MatrixWrapper[types.ColorMatrix]

Use to apply color transformations

Default value available for this field.
Also all values of this field can be reset() at once
property transition_power: float
Applies color effect transition
Use make_transition() or from_transition() to setup and apply transition from start to end with scale of value then you can change value with this method:
value = 0 |=> start
value = 1 |=> end
0 <= value <= 1 |=> start moved towards end
value > 1 |=> start moved towards end out of end bound
value < 0 |=> end moved towards start out of start bound
Accessors: Get Set
property transition: Optional[tools.Transition]
Current Transition or None if not set yet
Accessors: Get Readonly
make_transition(end: tools.Matrix.Any, start: Optional[tools.Matrix.Any] = None, initial_power: Optional[Union[float, int]] = None)[source]
Setup and apply transition from start to end with scale of initial_power:
initial_power = 0 |=> start
initial_power = 1 |=> end
0 <= initial_power <= 1 |=> start moved towards end
initial_power > 1 |=> start moved towards end out of end bound
initial_power < 0 |=> end moved towards start out of start bound
Parameters
  • startInitial state (default: current color effect)

  • endFinal state

  • initial_power – Float scale of transition normally stays between 0 and 1 to get transition effect (default: last value used or 0)

Raises

TypeError – If params conversion fails

from_transition(transition: tools.Transition, initial_power: Optional[Union[float, int]] = None)[source]

Setup and apply transition from existing one

Parameters
  • transition – one of effects or copy of last used one

  • initial_power – Float start scale of transition normally stays between 0 and 1 to get transition effect (default: last value used or 0)

class FiltersListWrapper(datasource: Optional[DataSource[T]] = None)[source]

Bases: WrappedField[tuple]

Window filtration list

Default value available for this field.
Also all values of this field can be reset() at once
class FullscreenTransformWrapper(datasource: Optional[_utils.DataSource[types.FullscreenTransform]] = None)[source]

Bases: WrappedField[types.FullscreenTransform]

Scale/offset fullscreen magnifier transformations

Function wrapper

This is wrapper for complex winapi function, so each time inner property accessed it will retrieve real values by calling this function, which can be used to change some parameters independently of others, to get/set a couple of values at once use WrappedField.batch(), also you may use raw, it works just like direct winapi function call.

Note

Default value available for this field.
Also all values of this field can be reset() at once
scale: float
Fullscreen magnification factor
Accessors: Get Set Delete
offset: FullscreenOffsetWrapper
Fullscreen magnification target offset
Relative to the upper-left corner of the primary monitor
Accessors: Get Set Delete
class InputTransformWrapper(datasource: Optional[_utils.DataSource[types.InputTransform]] = None)[source]

Bases: WrappedField[types.InputTransform]

Input transformation for pen and touch input

Function wrapper

This is wrapper for complex winapi function, so each time inner property accessed it will retrieve real values by calling this function, which can be used to change some parameters independently of others, to get/set a couple of values at once use WrappedField.batch(), also you may use raw, it works just like direct winapi function call.

Note

Default value available for this field.
Also all values of this field can be reset() at once
enabled: bool
Is input translation enabled
Accessors: Get Set Delete
source: RectangleWrapper
The source rectangle, in unmagnified screen coordinates, that defines the area of the screen that is magnified
Accessors: Get Set Delete
destination: RectangleWrapper
The destination rectangle, in screen coordinates, that defines the area of the screen where the magnified screen content is displayed.
Accessors: Get Set Delete
class TransformationMatrixWrapper(datasource: Optional[_utils.DataSource[types.TransformationMatrix]] = None)[source]

Bases: WrappedField[types.TransformationMatrix]

Scale/offset magnifier transformations

Function wrapper

This is wrapper for complex winapi function, so each time inner property accessed it will retrieve real values by calling this function, which can be used to change some parameters independently of others, to get/set a couple of values at once use WrappedField.batch(), also you may use raw, it works just like direct winapi function call.

Note

Default value available for this field.
Also all values of this field can be reset() at once
scale: TransformScale
Magnifier window scale
Accessors: Get Set Delete
offset: TransformOffset
Magnifier window target offset
Relative to the upper-left corner of window
Accessors: Get Set Delete
property pair: types.SimpleTransform
Tuple of (offset, scale), both of which are tuples of (x, y)
Accessors: Get Set
class FullscreenController[source]

Bases: object

Gives access to fullscreen functions of Magnification API

property transform: win_magnification._objects.FullscreenTransformWrapper
Scale/offset fullscreen magnifier transformations
Accessors: Get Readonly
property color_effect: win_magnification._objects.ColorMatrixWrapper
Color transformations
Accessors: Get Readonly
property input_transform: win_magnification._objects.InputTransformWrapper
Input transformation for pen and touch input
Accessors: Get Readonly
property cursor_visible: bool
Cursor shown/hidden state

Note

Doesn’t reflect actual value, shows last used value instead

Accessors: Get Set
class CustomWindowController[source]

Bases: object

Gives access to window (custom magnifier controller) functions of Magnification API

hwnd: int
Magnification window handle
Accessors: Get Set
property transform: win_magnification._objects.TransformationMatrixWrapper
Scale/offset magnifier transformations
Accessors: Get Readonly
property color_effect: win_magnification._objects.ColorMatrixWrapper
Color transformations
Accessors: Get Readonly
property source: win_magnification._objects.SourceRectangleWrapper
Source area, to get origin pixels from
Accessors: Get Readonly
property filters: win_magnification._objects.FiltersListWrapper
Window filtration list
Accessors: Get Readonly
class WinMagnificationAPI[source]

Bases: object

Object-Oriented wrapper for Magnification API
Also manages initialize() and finalize() calls
__del__()[source]

Calls dispose() on object distraction

property fullscreen: win_magnification._objects.FullscreenController
Gives access to fullscreen functions of Magnification API
Accessors: Get Readonly
property window: win_magnification._objects.CustomWindowController
Gives access to window (custom magnifier controller) functions of Magnification API
Accessors: Get Readonly
dispose()[source]

You may use this method for cleanup, but python’s GC can do that for you