pub struct ServerDistantLight { /* private fields */ }Expand description
The server-side counterpart of a
DistantLight.
Implementations§
Source§impl ServerDistantLight
impl ServerDistantLight
Sourcepub fn new(compositor: &Rc<ServerCompositor>) -> Rc<ServerDistantLight>
pub fn new(compositor: &Rc<ServerCompositor>) -> Rc<ServerDistantLight>
Creates the light, active and registered with its compositor: the UI-thread light activates its server object when it is created.
Sourcepub fn props(&self) -> &ServerDistantLightProps
pub fn props(&self) -> &ServerDistantLightProps
The properties of the light.
pub fn is_disposed(&self) -> bool
Trait Implementations§
Source§impl IAnimatedServerObject for ServerDistantLight
impl IAnimatedServerObject for ServerDistantLight
Source§fn server_object(&self) -> &ServerObject
fn server_object(&self) -> &ServerObject
The embedded
ServerObject part.Source§fn get_composition_property(
&self,
field_name: &str,
) -> Option<&'static CompositionProperty>
fn get_composition_property( &self, field_name: &str, ) -> Option<&'static CompositionProperty>
The composition property with the given name, if the class has one.
Source§fn as_server_object_dyn(&self) -> &dyn IServerObject
fn as_server_object_dyn(&self) -> &dyn IServerObject
The object as the base contract (an explicit upcast).
Source§fn read_property_variant(
&self,
property: &'static CompositionProperty,
) -> ExpressionVariant
fn read_property_variant( &self, property: &'static CompositionProperty, ) -> ExpressionVariant
Reads a property of the object as a variant. The default reads the field through
CompositionProperty::get_variant; an object with dynamic properties (a property set)
reads its own storage.Source§fn write_property_variant(
&self,
property: &'static CompositionProperty,
value: ExpressionVariant,
)
fn write_property_variant( &self, property: &'static CompositionProperty, value: ExpressionVariant, )
Writes a variant into a property of the object without notification (what an animation
does with the value it evaluated). The default writes the field through
CompositionProperty::set_variant; an object with dynamic properties writes its own
storage.Source§impl IServerAnimatedPropertyHost for ServerDistantLight
impl IServerAnimatedPropertyHost for ServerDistantLight
Source§fn set_animated_value(
&self,
property: &'static CompositionProperty,
current_value: ExpressionVariant,
committed_at: Duration,
animation: Rc<dyn IAnimationInstance>,
)
fn set_animated_value( &self, property: &'static CompositionProperty, current_value: ExpressionVariant, committed_at: Duration, animation: Rc<dyn IAnimationInstance>, )
SetAnimatedValue(prop, ref field, committedAt, animation): starts
animation on the property. current_value is the value of the
field as a variant; the animation writes the field through
CompositionProperty::set_variant.Source§fn remove_animation_for_property(&self, property: &'static CompositionProperty)
fn remove_animation_for_property(&self, property: &'static CompositionProperty)
The tail of
SetAnimatedValue(prop, out field, value): the field
has been assigned directly, so the animation of the property, if
any, is removed.Source§fn notify_animated_value_changed(&self, _property: &'static CompositionProperty)
fn notify_animated_value_changed(&self, _property: &'static CompositionProperty)
An animation wrote a new value into the field of
property.Source§impl IServerCompositionLight for ServerDistantLight
impl IServerCompositionLight for ServerDistantLight
Source§fn light_props(&self) -> &ServerCompositionLightProps
fn light_props(&self) -> &ServerCompositionLightProps
The properties of
CompositionLight.Source§fn light_state(&self) -> &ServerLightState
fn light_state(&self) -> &ServerLightState
The bookkeeping of what the light lit.
fn is_disposed(&self) -> bool
Source§fn coordinate_space(&self) -> Option<Rc<ServerCompositionVisual>>
fn coordinate_space(&self) -> Option<Rc<ServerCompositionVisual>>
The visual whose coordinates the light is in;
None for the targeted
visual (and for an ambient light, which has no position).Source§fn source(&self) -> LightSource
fn source(&self) -> LightSource
The light in its coordinate space.
Source§fn target_of(
&self,
visual: &ServerCompositionVisual,
) -> Option<Rc<ServerCompositionVisual>>
fn target_of( &self, visual: &ServerCompositionVisual, ) -> Option<Rc<ServerCompositionVisual>>
Whether
visual is lit by the light: in the subtree of a target and
not in the subtree of an exclusion (an exclusion that is also a
target is excluded). The target, if it is.Source§impl IServerObject for ServerDistantLight
impl IServerObject for ServerDistantLight
Source§fn deserialize_changes_core(
&self,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes_core( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
Reads the changes of the object from a batch.
Source§fn values_invalidated(&self)
fn values_invalidated(&self)
Called after a group of values of the object changed.
Source§fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
The object as a render resource, if it is one.
Source§fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
The object as an animatable object, if it is one.
Source§fn get_props(&self, type_id: TypeId) -> Option<&dyn Any>
fn get_props(&self, type_id: TypeId) -> Option<&dyn Any>
The generated property block of the given type embedded in the
object, if it has one. A class that embeds generated properties
forwards to their
find_props; composition properties locate their
fields through it.fn as_any(&self) -> &dyn Any
fn into_any_rc(self: Rc<Self>) -> Rc<dyn Any>
Source§fn deserialize_changes(
&self,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
Applies the changes of the object from a batch.
Source§fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
The object as a brush, if it is a server-side brush.
Source§fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
The object as a pen, if it is a server-side pen.
Source§fn as_render_data_geometry(
self: Rc<Self>,
) -> Option<Rc<dyn IRenderDataGeometry>>
fn as_render_data_geometry( self: Rc<Self>, ) -> Option<Rc<dyn IRenderDataGeometry>>
The object as a geometry usable by render data, if it is a
server-side geometry.
Source§fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
The object as a transform, if it is a server-side transform.
Source§fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>
fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>
The object as a gradient stop, if it is a server-side gradient stop.
Source§fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
The object as a composition surface, if it is one.
Source§impl IServerPropertyHost for ServerDistantLight
impl IServerPropertyHost for ServerDistantLight
Source§fn server_compositor(&self) -> Option<Rc<ServerCompositor>>
fn server_compositor(&self) -> Option<Rc<ServerCompositor>>
The compositor of the object, while it is alive. Used to resolve the
server objects a batch refers to.
Source§fn set_value(
&self,
_property: &'static CompositionProperty,
change: ServerValueChange<'_>,
)
fn set_value( &self, _property: &'static CompositionProperty, change: ServerValueChange<'_>, )
SetValue(prop, ref field, value) as the class of the object
defines it. A plain server object assigns; an animated object also
invalidates the subscriptions of the property; a render resource
goes through super::ServerRenderResourceCore::set_value.Source§impl IServerRenderResource for ServerDistantLight
impl IServerRenderResource for ServerDistantLight
fn add_observer(&self, observer: &Rc<dyn IServerRenderResourceObserver>)
fn remove_observer(&self, observer: &Rc<dyn IServerRenderResourceObserver>)
fn queued_invalidate(&self)
Source§impl IServerRenderResourceHost for ServerDistantLight
impl IServerRenderResourceHost for ServerDistantLight
Source§fn compositor(&self) -> Option<Rc<ServerCompositor>>
fn compositor(&self) -> Option<Rc<ServerCompositor>>
The compositor of the resource, while it is alive.
Source§fn as_render_resource_rc(&self) -> Option<Rc<dyn IServerRenderResource>>
fn as_render_resource_rc(&self) -> Option<Rc<dyn IServerRenderResource>>
The resource as a shared handle, for the invalidation queue.
Source§fn resource_property_changed(&self)
fn resource_property_changed(&self)
Called once per group of property changes, before the queued
invalidation.
Source§impl IServerRenderResourceObserver for ServerDistantLight
impl IServerRenderResourceObserver for ServerDistantLight
fn dependency_queued_invalidate(&self, _sender: &dyn IServerRenderResource)
Source§impl ServerCompositionLightHooks for ServerDistantLight
impl ServerCompositionLightHooks for ServerDistantLight
fn deserialize_changes_extra(&self, _reader: &mut BatchStreamReader<'_>)
fn on_fields_deserialized(&self, _changed: CompositionLightChangedFields)
fn on_targets_changed(&self)
fn on_targets_changing(&self)
fn on_exclusions_from_targets_changed(&self)
fn on_exclusions_from_targets_changing(&self)
fn on_is_enabled_changed(&self)
fn on_is_enabled_changing(&self)
Source§impl ServerDistantLightHooks for ServerDistantLight
impl ServerDistantLightHooks for ServerDistantLight
fn deserialize_changes_extra(&self, _reader: &mut BatchStreamReader<'_>)
fn on_fields_deserialized(&self, _changed: DistantLightChangedFields)
fn on_coordinate_space_changed(&self)
fn on_coordinate_space_changing(&self)
Auto Trait Implementations§
impl !Freeze for ServerDistantLight
impl !RefUnwindSafe for ServerDistantLight
impl !Send for ServerDistantLight
impl !Sync for ServerDistantLight
impl !UnwindSafe for ServerDistantLight
impl Unpin for ServerDistantLight
impl UnsafeUnpin for ServerDistantLight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more