From: Xavier V. <xav...@fr...> - 2004-02-06 23:37:18
|
Hello Michael, hello list ! Here's the patch to finish a proper implementation of the visible attribute, following your instructions. > > - a better solution would be to implement the visible attribute withing > > the layout itself so it can work for text and other widgets without > > implementing it for each one. But I can't figure out where to hack for > > this. > I'm afraid this is not possible. I read several times drv_generic_text, and y idea is not applicable, we must implement it for each widget. It would be trivial for text. > Taking a quick look at the code, this has to be done in the draw() > function inside drv_generic_text.c. There are some lines where > Icon->ascii is transferred to the framebuffer and/or the display. Add > some short code here to use a blank instead of the ascii value. I send the ASCII code 32 (space) instead of the code of user defined char corresponding to the icon. There's no 'empty' char, so I used space. The ascii code is taken from the datasheet of cwlinux display, but it works for my HD, so I suppose it'll work for the others. > Another point: I would not issue a warning about a missing > visible_expression. If none is there (which should be the default), > don't replace it with "1", but hanlde this by not evaluating the > expression if NULL, but using 1 as a result. Done > Maybe this could be combinded with a "blinking" attribute. I don't know really how to do this ? A simple solution using the same blink speed as 'speed' would be to do a Icon->visible=!Icon->visible if Icon->blink. But I don't know how to implement a blink speed independant from the display speed. Bye ! -- Xavier VELLO <xav...@fr...> PS: I saw somebody on the lcd4linux-users ML who had a software-controlled blacklight on his HD (the pin 3 was connected to a transistor controlled by a spare pin of the // port if I remember), maybe you could find him and implement this functionnality ? -> ToDo ;) |