python-elgato-streamdeck icon indicating copy to clipboard operation
python-elgato-streamdeck copied to clipboard

[Proposal] Isolate in classes decks and buttons to ease integrations

Open vgonisanz opened this issue 4 years ago • 0 comments

Hi @abcminiuser & contributors. Thanks for this awesome library, I really enjoy creating code with it to make some stream deck applications.

Is your feature request related to a problem? Please describe.

I feel the library is too much at low level. I miss some classes to provide users a faster way to create apps.

Describe the solution you'd like

I would like to implement several use cases with less lines, and provide some of them already implemented.

Describe alternatives you've considered

I have developed a proof of concept with the same samples you provide using other clases in this repository: https://github.com/vgonisanz/streamdeck_manager/, It have a full readme to run it and the same samples you give in the library.

Additional context

The changes proposed in the proof of concept implement classes that may be too much different from your design, and exist some name conflicts (Deck vs Streamdeck, etc) I just made a prototype to see what would be possible to offer to users. I have not a way to render gif yets, and I have not some use cases implemented yet so the POC may change in the future.

Features:

  • Button class provide a way to render a icon, a background, a labels easily and control padding.
  • Deck class manage all its buttons.
  • Deck class generate ranges to ease create panels of buttons.
  • The core (like the DeviceManager) manage the threads, open and close the HW automatically (resource acquisition is initialization approach)

This is another example I developed:

image

The code is here: https://github.com/vgonisanz/streamdeck_manager/blob/main/streamdeck_manager/samples/buttons_types.py

vgonisanz avatar Aug 14 '21 11:08 vgonisanz