| 1 |
FAQ: |
|---|
| 2 |
|
|---|
| 3 |
1)What is it ? |
|---|
| 4 |
------------ |
|---|
| 5 |
This is a binding of Xlib and xcb for D language (version 1) |
|---|
| 6 |
|
|---|
| 7 |
2)I found a bug and/or I want to patch this binding |
|---|
| 8 |
--------------------------------------------------- |
|---|
| 9 |
For any bug/modification please send me a report/patch at sligor(at)free.fr with object:"[Xlib]Bug Report" |
|---|
| 10 |
You can also patch directly here http://www.dsource.org/projects/bindings |
|---|
| 11 |
|
|---|
| 12 |
3)How I use Xlib binding ? |
|---|
| 13 |
-------------------------- |
|---|
| 14 |
|
|---|
| 15 |
-add "import std.c.linux.Xlib;" to your code. |
|---|
| 16 |
-use Xlib functions like in C with some minor change: |
|---|
| 17 |
this bindings is more strongly typed than C version,it use D features when it can. |
|---|
| 18 |
|
|---|
| 19 |
so instead of writing: |
|---|
| 20 |
GC gc=XCreateGC(display,window,GCForeground | GCBackground,&values); |
|---|
| 21 |
you while need to write: |
|---|
| 22 |
GC gc=XCreateGC(display,window,GCMask.GCForeground | GCMask.GCBackground,&values); |
|---|
| 23 |
|
|---|
| 24 |
For example you will compile your code like this if you're using dmd: |
|---|
| 25 |
dmd yourfile.d Xlib.d X.d -L-lX11 (don't forget -L-lX11 ;) ) |
|---|
| 26 |
|
|---|
| 27 |
For a complete example read example.d |
|---|
| 28 |
|
|---|
| 29 |
4)And how to learn programming Xlib ? |
|---|
| 30 |
------------------------------------- |
|---|
| 31 |
http://tronche.com/gui/x/xlib-tutorial/ for a complete tutorial |
|---|
| 32 |
http://tronche.com/gui/x/xlib/ for documentation |
|---|
| 33 |
|
|---|
| 34 |
5)How I use xcb binding ? |
|---|
| 35 |
------------------------- |
|---|
| 36 |
Read README file in xcb directory |
|---|
| 37 |
|
|---|
| 38 |
6)I want to improove this binding what I can do? |
|---|
| 39 |
------------------------------------------------ |
|---|
| 40 |
->read TODO file |
|---|