Hello everybody !
I have installed directFB on my embedded card IMX21.
I can run my programs with directFB, but I have to
problems.
1. The first is a problem with the colours.
You know that, with directFB, colours are coded with 4
Bytes : R,G,B,A (R=Red, G=Green, B=blue,
A=Alphachannel).
But on my IMX, this code is badly interpreted: the
first byte represents the Green, the second and the
third the blue, the fourth the red. (G,B1,B2,R)
So, if I select the colour Red for my background,
(R=FF, G=00, B=00, A=00) it will be paint in green
(G=FF, B1=00, B2=00, R=00).
The big problem is when I post a text or a picture. As
the Alphachannel for texts or pictures is always FF,
all my texts or picture are too red (by example, if I
select the black colour (00,00,00,00) for a texts, the
fourth bytes become automatically FF, so my text is in
Red.)
And for the picture, as I can change the three firsts
bytes to obtain the good colour, I cant obtain the
good colour (by example my black is red (see above),
my red is yellow (red cod is normally FF,00,00, the
fourth byte is always FF, so, on my screen, I have
green and red, its the yellow colour).
I know I can make a black picture to obtain a red
picture, but its not useful! (Eventually, as PNG is
an open format, I can make a transformation program!).
The very big problem is that I cant use color
without red !).
For your information:
I have wrote an /etc/directfbrc without any effect
I have wrote an /etc/fb.modes without any effect
I have set the option RGB for my dsc :
DFBSurfaceDescription dsc;
dsc.pixelformat=DSPF_RGB16 ;
without success !
My programme run well on my PC, this problem is only
on my IMX card
2. The second is for my keypad
On my IMX card, I have a small keyboard (Keypad)
I try to use this keypad in my directFB programs
When I run the tutorial programs, there is no effect
when I use my keyboard.
So, I have reduced the code to see if the
initialisation was good :
static IDirectFBInputDevice *keyboard = NULL;
DFBCHECK (dfb->GetInputDevice (dfb, DIDID_KEYBOARD,
&keyboard));
printf("DIDIDKEYBOARD = %d \n", DIDID_KEYBOARD);
DFBCHECK (keyboard->CreateEventBuffer (keyboard,
&buffer));
DFBInputEvent event;
DFBCHECK (buffer->WaitForEvent (buffer));
printf("Event!");
The result is that DIDID_KEYBOARD=0
And I have never seen Event! and I am sure that I
have activated all the buttons of my keypad
I have try to replace DIDID_KEYBOARD by a numeric
value (ex: 1, the values I have found in
/proc/devices), but in theses cases, directFB says me
that the inputdevice cant be found!
How I can make a list of the different inputdevices? I
havent understood how I can use these functions:
EnumInputDevices (
IDirectFB * thiz,
DFBInputDeviceCallback callback,
void * callbackdata
);
DFBInputDeviceCallback
DFBEnumerationResult (*DFBInputDeviceCallback) (
DFBInputDeviceID device_id,
DFBInputDeviceDescription desc,
void *callbackdata
);
Conclusion: I will be very thankful to be helped. In
effect, I cant advance in my project.
Than you very much.
Chris
Chris
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur
Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
_______________________________________________
directfb-users mailing list
[EMAIL PROTECTED]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users