Thread: iLiad iLiad button support
View Single Post
Old 11-06-2008, 08:53 AM   #5
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by ericshliao View Post
Hi, I have two questions.
iLiad provide 4 grayscale, why do you convert 24 bit color to 8 bit gray? I am working on a image viewer using gtk. To save memory, I wanted to load color image to grayscale, but gtk seems only support 24 bit rgb.
The iliad X server uses the StaticGray visual, that is a 8bpp mode for grayscale displays.

The underliying framebuffer also supports that, as it's implemented as a 8bpp framebuffer.

As the screen is 4bpp (or 2bpp is using typing redraw in my experience), the least significant bits of each pixel are discarded inside the framebuffer driver, but that is off-limits for userspace applications.

So in practice, all apps have to display 8bit grayscale images (independently of how they are stored internally, be it 24bpp RGB or 4bpp gray).

I
Quote:
Originally Posted by ericshliao View Post
don't understand Antartica's words. He said something about setting class name "sh" to make app to receive button events from contentlister. Could somebody give an explaination?
When you open a window against an X server, that window has a "window class" that's independent of the window title. That class serves to identify the window to the window manager, so it can do "special" things to that window (put an icon in the icon bar, opening it in certain workspace, don't put borders, etc) if the user has configured the window manager for it. It's extensivel used in windowmaker window manager, for example.

In the iliad, that id is used to find the window that will receive hardware buttons synthetic keypresses (generated by contentlister).

try:
$ xwininfo -root
$ xwininfo -root -children
Antartica is offline   Reply With Quote