Skip to content

API change to event handling at the lower ginga viewer widget level#1138

Draft
ejeschke wants to merge 4 commits intomainfrom
new-event-handling
Draft

API change to event handling at the lower ginga viewer widget level#1138
ejeschke wants to merge 4 commits intomainfrom
new-event-handling

Conversation

@ejeschke
Copy link
Owner

@ejeschke ejeschke commented Dec 9, 2025

Description

The event handling API at the ginga viewer lower level is changed so that event objects are passed for all event callbacks at this level. This includes the following callbacks: map, focus, enter, leave, key-press, key-release, button-press, button-release, motion, scroll, swipe, pinch, pan.

Note that this level of API use is recommended only for users adding a viewer widget to their own viewer. Users of the reference viewer should be using the callbacks in ginga.Bindings, which have not changed. Developers of plugins for the reference viewer are unlikely to see much effect unless they are using one of the above callbacks.

The reason for the change is to allow more flexible changes to the event system by changing the event in the future instead of adding fixed position arguments to the callback API.

Merging this PR should be done only for a major version release.

@ejeschke ejeschke self-assigned this Dec 9, 2025
@ejeschke ejeschke added maintenance Work done to keep code maintained widget labels Dec 9, 2025
@ejeschke ejeschke added this to the v6.0.0 milestone Dec 9, 2025
@ejeschke ejeschke marked this pull request as draft December 9, 2025 22:19
The event handling API at the ginga viewer lower level is changed
so that event objects are passed for all event callbacks at this level.
This includes the following callbacks: map, focus, enter, leave,
key-press, key-release, button-press, button-release, motion, scroll,
swipe, pinch, pan

Note that this level of API use is recommended only for users adding
a viewer widget to their own viewer.  Users of the reference viewer
should be using the callbacks in ginga.Bindings, which have not changed.

The reason for the change is to allow more flexible changes to the
event system by changing the event in the future instead of adding
fixed position arguments to the callback API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Work done to keep code maintained reference viewer widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant