Re: Highlighting pictograms
Stefan Herdler <[email protected]> Sun, 13 Nov 2011 03:01:01 +0100
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <[email protected]> |
Hi! On 09.11.2011 23:04, Wolfgang Hauck wrote: > > If you really want to introduce a flexible and extensible driver > interface do not encode information _directly_ in bits, but use functions: > > * int pictogram_init_attr(PictogramAttr &attr) > * int pictogram_destroy_attr(PictogramAttr &attr) > * int pictogram_set_attr_enable(PictogramAttr &attr, bool enable) > * bool pictogram_has_attr_enable(PictogramId id) > * int pictogram_set_attr_value(PictogramAttr &attr, int value) > * bool pictogram_has_attr_value(PictogramId id) > > If there arises the need to introduce a new feature like highlighting > add a new attribute with a new function > > * pictogram_set_attr_highlight(PictogramAttr &attr, bool enable) > * pictogram_has_attr_highlight(PictogramId id) > > Finally set the pictogram by > > * pictogram_set(PictogramId id, const PictogramAttr* attr) > > The implementation is still free to encode the information bits. > > For the client the language would contain constructs like > "PICTOGRAM_SET_ATTR attrid ENABLE ON" followed by "PICTOGRAM_APPLY > pictogramid attrid". > > But for the moment I really would restrict ourselves to the simple > cases of boolean and parametrised pictograms. They cover a lot of use > cases. That's more or less what I have done too. I only introduced a few more feature types to provide additional usage information for the client. > > Regards, > Wolfgang I am not a full-time programmer and my experience is mainly in the area microcontrollers. I do not yet completely understand how the interface on the client and driver side will look like. But if the proposal will lead to a similarly simple and universal interface, is it right with me. (Only written must it be by someone else then ;).) Regards Stefan _______________________________________________ LCDproc mailing list [email protected] http://lists.omnipotent.net/mailman/listinfo/lcdproc