Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generic Android hosts currently need to implement their own stylus/Canvas fallback when no vendor overlay attaches. This draft adds
InkControllerFactory.createStandard(), an opt-in public-API controller adapted from the implementation used in Kalamos Notes and our Android KOReader adaptation. Existingcreate()Bigme/Onyx selection and the Noop path are unchanged.The controller handles stylus input, historical samples, pressure and dashed trails, bounded writing areas, excluded controls and capture-only gestures for host-owned selection/checkbox/eraser behavior. It retains authoritative page pixels, supports cropped chrome updates and transparent replacement, batches presentation per MotionEvent and completes active strokes once when paused or detached. An optional
InkEditingControllerextends the existing contract without adding requirements to vendor implementations.This is a focused first contribution from Kalamos InkSDK, not a replacement of the upstream architecture. Broader Bigme lifecycle/composition changes and our device-provider registry remain in that adaptation for separate discussion. Credit remains with Ed Wei (imedwei) and InkSDK contributors. The new controller/interface/test carry GPL-3.0-only notices and the full licence; the contribution does not relicense existing upstream files.
Validation
:demo:assembleDebugpasses. Existing vendor selection tests continue to pass.This implementation uses ordinary SurfaceView composition; it does not claim hardware-overlay latency or e-ink waveform equivalence. Device acceptance is owner-run. The README documents surface lifecycle, authoritative page synchronization and the requirement to deliver each event through either View dispatch or explicit forwarding once, never both. The existing demo is built unchanged; this PR does not silently switch its vendor factory to the opt-in controller.