Prima::...croller(3)
π Prima::Widget::MouseScroller β auto-repeating mouse events
okay so this is a page from the User Contributed Perl Documentation set, and it's about the Prima::Widget::MouseScroller class β the little icon that makes your mouse events repeat all by themselves. no cap, it's lowkey iconic. π¦
β¨ NAME β¨
Prima::Widget::MouseScroller β auto-repeating mouse events π±οΈπ«
πΈ DESCRIPTION πΈ
So this class implements routines for emulation of auto repeating mouse events. literally it's the girl that keeps tapping your mouse button for you while you hold still. π
A code inside MouseMove callback can be implemented by the following scheme:
if ( mouse_pointer_inside_the_scrollable_area) {
$self-> scroll_timer_stop;
} else {
$self-> scroll_timer_start unless $self-> scroll_timer_active;
return unless $self-> scroll_timer_semaphore;
$self-> scroll_timer_semaphore( 0);
}
The class uses a semaphore {mouseTransaction}, which should be set to non-zero if a widget is in mouse capture state, and set to zero or undef otherwise. periodt. π«Ά
The class starts an internal timer, which sets a semaphore and calls MouseMove notification when triggered. The timer is assigned the timeouts, returned by Prima::Application::get_scroll_rate ( see get_scroll_rate in Prima::Application ). π
β Methods β
π§ scroll_timer_active
Returns a boolean value indicating if the internal timer is started. like, is the vibe check passing or not π₯
π§ scroll_timer_semaphore [ VALUE ]
A semaphore, set to 1 when the internal timer was triggered. It is advisable to check the semaphore state to discern a timer-generated event from the real mouse movement β because ngl, you gotta know if that was your mouse or the timer doing its thing π. If VALUE is specified, it is assigned to the semaphore.
π§ scroll_timer_start
Starts the internal timer. go bestie go πββοΈπ¨
π§ scroll_timer_stop
Stops the internal timer. okay queen, take a break πβ¨
π AUTHOR π
Dmitry Karasik, <dmitry@karasik.eu.org>. π
π SEE ALSO π
Prima, Prima::Widget, Prima::ScrollBar. all the linked besties, iykyk π«Ά
and that's the whole page, diva π β signed off from the perl v5.42.0 era on 2024-08-20, the date this little gem was snapshot. slay β
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms