MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / animation_hook

Method animation_hook

plugins/animate/animate.cpp:82–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 };
81
82 animation_hook(wayfire_view view,
83 std::unique_ptr<wf::animate::animation_base_t> _animation,
84 wf::animation_description_t duration,
85 wf::animate::animation_type type,
86 std::string name)
87 {
88 this->type = type;
89 this->view = view->shared_from_this();
90 this->name = name;
91
92 this->animation = std::move(_animation);
93 this->animation->init(view, duration, type);
94
95 set_output(view->get_output());
96 /* Animation is driven by the output render cycle the view is on.
97 * Thus, we need to keep in sync with the current output. */
98 view->connect(&on_set_output);
99 wf::scene::set_node_enabled(view->get_root_node(), true);
100
101 if (type == wf::animate::ANIMATION_TYPE_UNMAP)
102 {
103 set_unmapped_contents();
104 }
105 }
106
107 void stop_hook(bool detached)
108 {

Callers

nothing calls this directly

Calls 5

set_node_enabledFunction · 0.85
shared_from_thisMethod · 0.80
connectMethod · 0.80
initMethod · 0.45
get_outputMethod · 0.45

Tested by

no test coverage detected