Hi Maurí­cio.

DFBDisplayLayerID is used when you need to specify one layer.
This is normally a value between 0 and the number of layers you have; something like 0...4 is not uncommon.
This is therefore simply an int, or in this specific case an unsigned int.

DFBDisplayLayerIDs is used when more than one layer is passed.
This is a bitmask, and therefore we chose to specifically chose an unsigned 32-bit value, this makes DFB_DISPLAYLAYER_IDS_MAX easier to define and should be enough anyway.

going from one to the other is slightly tricky, casting is not the right way here!

let's give an example:
DFBDisplayLayerID id;
DFBDisplayLayerIDs ids;
id = SOME_EXISTING_LAYER_ID;
ids = 0;
DFB_DISPLAYLAYER_IDS_ADD(ids,layer_id);

now ids contains 1 layer, namely the layer with id "id".
it's easiest to check the defines in directfb.h since they are commented.

hth
Niels

Maurí­cio CA wrote:
What is the difference between types

  DFBDisplayLayerID

and

  DFBDisplayLayerIDs ?

At first, it seemed to me that the second would be a set of the
first, but they are declared as different types (unsigned the
first, unsigned 32 bits the second).

When using

  DFB_DISPLAYLAYER_IDS_ADD

which of them would I usually be supposed to use? I could not find
this macro in the examples.

Thanks,
Maurício

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users



--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to