Skip to content

Added State.program_mut.#2666

Closed
bobbens wants to merge 1 commit intoiced-rs:masterfrom
bobbens:program_mut
Closed

Added State.program_mut.#2666
bobbens wants to merge 1 commit intoiced-rs:masterfrom
bobbens:program_mut

Conversation

@bobbens
Copy link
Copy Markdown

@bobbens bobbens commented Nov 8, 2024

I'm working on a non-standard application where iced is embedded in a game using sdl2 + wgpu. I need to be able to create multiple overlapping "pseudo-windows" (basically collection of widgets) and am using a modal-like approach for this. I need to be able to create new "pseudo-windows" dynamically based on the game state that can be triggered by events that iced will not receive. I've got it mainly working, but am having issues with the isolation that iced_runtime::program::State does around the program it is encapsulating.

Currently, it's possible to get an immutable program reference with State.program, however, it is not possible to get a mutable one. Simply adding the State.program_mutmethod would simplify all my code and logic without having to deal with messages that have to be Send. This PR just adds State.program_mut. I have tested and the integration example works fine with it.

@hecrj
Copy link
Copy Markdown
Member

hecrj commented Nov 18, 2025

This module has been removed since it wasn't really used by anything!

@hecrj hecrj closed this Nov 18, 2025
@hecrj hecrj added this to the 0.14 milestone Nov 18, 2025
@hecrj hecrj added feature New feature or request shell addition labels Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition feature New feature or request shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants