Re: How to start with X?
On Wed, Jan 22, 2020 at 06:26:32PM +0100, Emanuele Petriglia wrote: > Hi! > > I would like to learn how to create a C graphical application without > using some toolkit for hobby. I know that there are two main libraries: > Xlib and xcb. The first is old but has a lot of documentation, the > second is newer but less documented than the first. So I was thinking to > learn Xlib and then xcb. > > I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye > published on 1994. I do not found any other recent book. Is it good to > start with Xlib even is it old? Good day! The Xlib programming manual is a good book, but it is definitely based on "X Window System Protocol" (X Consortium standard). There are a lot of direct and indirect references to concepts and behavior, described in the protocol standard. In fact, the "Xlib" book is very incomplete if viewed alone. So, I think, that it is better to read protocol standard at first. There is no need to memorize byte values and structure alignments, as the Xlib have a good constants and structures for that. But most concepts described only there. btw, "proto" book (it is usually named proto.pdf or proto.ps in X sources) is a good material even for those who write apps for X11 using toolkits. As well as ICCCM book (Inter-Client Communi- cations Conventions Manual). ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
Thank you! On 24/01/2020 16:57, Carsten Haitzler wrote: > On Thu, 23 Jan 2020 16:38:18 +0100 Emanuele Petriglia > said: > >> Hi, >> >> Thanks for the advice. Do you have any thoughts about the book? I found also >> a digital version thanks to Lucien. > That's the book i started with back in like 1995 or so... :) It will teach you > some stuff. It will not cover everything. You'll only really learn by doing > the > hard yards and doing lots yourself, and as your journey moves along, ask > questions of those who may have been there before you. > > This is also a reason to stick with Xlib - that book will not cover xcb. > >> -- >> Emanuele Petriglia (ema-pe) >> >> Sent from my mobile. Please excuse my brevity. >> >> On 23 January 2020 16:25:05 CET, Carsten Haitzler >> wrote: >>> On Wed, 22 Jan 2020 18:26:32 +0100 Emanuele Petriglia >>> said: >>> Hi! I would like to learn how to create a C graphical application without using some toolkit for hobby. I know that there are two main >>> libraries: Xlib and xcb. The first is old but has a lot of documentation, the second is newer but less documented than the first. So I was thinking >>> to learn Xlib and then xcb. I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye published on 1994. I do not found any other recent book. Is it good >>> to start with Xlib even is it old? >>> Advice: stick with Xlib. More examples. More docs. XCB is only better >>> in a few >>> very specific cases that mostly are the areas WM and toolkit authors >>> might >>> obsess over for small gains in performance. So stick to Xlib - that's >>> my advice. >>> >>> -- >>> - Codito, ergo sum - "I code, therefore I am" >>> -- >>> Carsten Haitzler - ras...@rasterman.com >>> >>> ___ >>> xorg@lists.x.org: X.Org support >>> Archives: http://lists.freedesktop.org/archives/xorg >>> Info: https://lists.x.org/mailman/listinfo/xorg >>> Your subscription address: %(user_address)s > -- Emanuele Petriglia (ema-pe) ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
On Thu, 23 Jan 2020 16:38:18 +0100 Emanuele Petriglia said: > Hi, > > Thanks for the advice. Do you have any thoughts about the book? I found also > a digital version thanks to Lucien. That's the book i started with back in like 1995 or so... :) It will teach you some stuff. It will not cover everything. You'll only really learn by doing the hard yards and doing lots yourself, and as your journey moves along, ask questions of those who may have been there before you. This is also a reason to stick with Xlib - that book will not cover xcb. > -- > Emanuele Petriglia (ema-pe) > > Sent from my mobile. Please excuse my brevity. > > On 23 January 2020 16:25:05 CET, Carsten Haitzler > wrote: > >On Wed, 22 Jan 2020 18:26:32 +0100 Emanuele Petriglia > > said: > > > >> Hi! > >> > >> I would like to learn how to create a C graphical application without > >> using some toolkit for hobby. I know that there are two main > >libraries: > >> Xlib and xcb. The first is old but has a lot of documentation, the > >> second is newer but less documented than the first. So I was thinking > >to > >> learn Xlib and then xcb. > >> > >> I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye > >> published on 1994. I do not found any other recent book. Is it good > >to > >> start with Xlib even is it old? > > > >Advice: stick with Xlib. More examples. More docs. XCB is only better > >in a few > >very specific cases that mostly are the areas WM and toolkit authors > >might > >obsess over for small gains in performance. So stick to Xlib - that's > >my advice. > > > >-- > >- Codito, ergo sum - "I code, therefore I am" > >-- > >Carsten Haitzler - ras...@rasterman.com > > > >___ > >xorg@lists.x.org: X.Org support > >Archives: http://lists.freedesktop.org/archives/xorg > >Info: https://lists.x.org/mailman/listinfo/xorg > >Your subscription address: %(user_address)s -- - Codito, ergo sum - "I code, therefore I am" -- Carsten Haitzler - ras...@rasterman.com ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
If you are interessted in widget programming, this may be helpful: https://github.com/xtforever/xtcw re, wh Am 22.01.2020 18:26, schrieb Emanuele Petriglia: > Hi! > > I would like to learn how to create a C graphical application without > using some toolkit for hobby. I know that there are two main libraries: > Xlib and xcb. The first is old but has a lot of documentation, the > second is newer but less documented than the first. So I was thinking to > learn Xlib and then xcb. > > I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye > published on 1994. I do not found any other recent book. Is it good to > start with Xlib even is it old? > ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
Hi, thank you for the reply. I'll check the two links. Between the first link and the book, which is it better? -- Emanuele Petriglia (ema-pe) Sent from my mobile. Please excuse my brevity. On 23 January 2020 12:53:24 CET, Teodoro Santoni wrote: >Hi, > >2020-01-22 18:26 GMT+01:00, Emanuele Petriglia >: >> Hi! >> >> I would like to learn how to create a C graphical application without >> using some toolkit for hobby. I know that there are two main >libraries: >> Xlib and xcb. The first is old but has a lot of documentation, the >> second is newer but less documented than the first. So I was thinking >to >> learn Xlib and then xcb. >> >> I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye >> published on 1994. I do not found any other recent book. Is it good >to >> start with Xlib even is it old? >> >> -- >> Emanuele Petriglia (ema-pe) >> >> ___ >> xorg@lists.x.org: X.Org support >> Archives: http://lists.freedesktop.org/archives/xorg >> Info: https://lists.x.org/mailman/listinfo/xorg >> Your subscription address: %(user_address)s >> > > >[1] is a guide that should be fairly valid on xlib. >From there you can afterwards embed xlib-xcb.h, gradually migrate from >xlib to xcb reading the docs, read the guide from iotek for fonts in >xcb without xft [2] or embed pango in your application. > >[1] https://tronche.com/gui/x/xlib/ >[2] https://venam.nixers.net/blog/unix/2018/09/02/fonts-xcb.html ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
On Wed, 22 Jan 2020 18:26:32 +0100 Emanuele Petriglia wrote: > Hi! > > I would like to learn how to create a C graphical application without > using some toolkit for hobby. I know that there are two main > libraries: Xlib and xcb. The first is old but has a lot of > documentation, the second is newer but less documented than the > first. So I was thinking to learn Xlib and then xcb. > > I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye > published on 1994. I do not found any other recent book. Is it good to > start with Xlib even is it old? If you want to do anything more than 'play around' in order to learn the concepts then you might be better to start with a toolkit. That is, if you want to build any real application, start from a toolkit. But if you do want to start from basics then you may as well start with Xlib IMHO. Once you understand that, you can move on to XCB if necessary or to a toolkit. Having said all that, I learned X many years ago starting with that book and the accompanying XLIB Reference Manual. They're a fair way to do it. There's also the official documentation of course, which is more up to date. See https://www.x.org/wiki/ProgrammingDocumentation/ ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
Hi, Thanks for the advice. Do you have any thoughts about the book? I found also a digital version thanks to Lucien. -- Emanuele Petriglia (ema-pe) Sent from my mobile. Please excuse my brevity. On 23 January 2020 16:25:05 CET, Carsten Haitzler wrote: >On Wed, 22 Jan 2020 18:26:32 +0100 Emanuele Petriglia > said: > >> Hi! >> >> I would like to learn how to create a C graphical application without >> using some toolkit for hobby. I know that there are two main >libraries: >> Xlib and xcb. The first is old but has a lot of documentation, the >> second is newer but less documented than the first. So I was thinking >to >> learn Xlib and then xcb. >> >> I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye >> published on 1994. I do not found any other recent book. Is it good >to >> start with Xlib even is it old? > >Advice: stick with Xlib. More examples. More docs. XCB is only better >in a few >very specific cases that mostly are the areas WM and toolkit authors >might >obsess over for small gains in performance. So stick to Xlib - that's >my advice. > >-- >- Codito, ergo sum - "I code, therefore I am" >-- >Carsten Haitzler - ras...@rasterman.com > >___ >xorg@lists.x.org: X.Org support >Archives: http://lists.freedesktop.org/archives/xorg >Info: https://lists.x.org/mailman/listinfo/xorg >Your subscription address: %(user_address)s ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
On Wed, 22 Jan 2020 18:26:32 +0100 Emanuele Petriglia said: > Hi! > > I would like to learn how to create a C graphical application without > using some toolkit for hobby. I know that there are two main libraries: > Xlib and xcb. The first is old but has a lot of documentation, the > second is newer but less documented than the first. So I was thinking to > learn Xlib and then xcb. > > I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye > published on 1994. I do not found any other recent book. Is it good to > start with Xlib even is it old? Advice: stick with Xlib. More examples. More docs. XCB is only better in a few very specific cases that mostly are the areas WM and toolkit authors might obsess over for small gains in performance. So stick to Xlib - that's my advice. -- - Codito, ergo sum - "I code, therefore I am" -- Carsten Haitzler - ras...@rasterman.com ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
Hi, I checked the first link but it is a bit incomplete on some parts. The second link is the digital edition of the book I want to purchase. Anyway I prefers the handbook version, but thanks for the links! -- Emanuele Petriglia (ema-pe) Sent from my mobile. Please excuse my brevity. On 23 January 2020 14:34:53 CET, Lucien Gentis wrote: >There is also this tuto for xcb : > >https://xcb.freedesktop.org/tutorial/ > >and this doc for Xlib programming with many examples : > >http://csweb.cs.wfu.edu/~torgerse/Kokua/Irix_6.5.21_doc_cd/usr/share/Insight/library/SGI_bookshelves/SGI_Developer/books/XLib_PG/sgi_html/index.html > >Le 23/01/2020 à 12:53, Teodoro Santoni a écrit : >> Hi, >> >> 2020-01-22 18:26 GMT+01:00, Emanuele Petriglia >: >>> Hi! >>> >>> I would like to learn how to create a C graphical application >without >>> using some toolkit for hobby. I know that there are two main >libraries: >>> Xlib and xcb. The first is old but has a lot of documentation, the >>> second is newer but less documented than the first. So I was >thinking to >>> learn Xlib and then xcb. >>> >>> I found this book about Xlib: "XLIB Programming Manual" of Adrian >Nye >>> published on 1994. I do not found any other recent book. Is it good >to >>> start with Xlib even is it old? >>> >>> -- >>> Emanuele Petriglia (ema-pe) >>> >>> ___ >>> xorg@lists.x.org: X.Org support >>> Archives: http://lists.freedesktop.org/archives/xorg >>> Info: https://lists.x.org/mailman/listinfo/xorg >>> Your subscription address: %(user_address)s >>> >> >> [1] is a guide that should be fairly valid on xlib. >> From there you can afterwards embed xlib-xcb.h, gradually migrate >from >> xlib to xcb reading the docs, read the guide from iotek for fonts in >> xcb without xft [2] or embed pango in your application. >> >> [1] https://tronche.com/gui/x/xlib/ >> [2] https://venam.nixers.net/blog/unix/2018/09/02/fonts-xcb.html >> ___ >> xorg@lists.x.org: X.Org support >> Archives: http://lists.freedesktop.org/archives/xorg >> Info: https://lists.x.org/mailman/listinfo/xorg >> Your subscription address: %(user_address)s >___ >xorg@lists.x.org: X.Org support >Archives: http://lists.freedesktop.org/archives/xorg >Info: https://lists.x.org/mailman/listinfo/xorg >Your subscription address: %(user_address)s ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
Hello, 2020-01-23 13:11 GMT+01:00, Emanuele Petriglia : > Hi, thank you for the reply. I'll check the two links. Between the first > link and the book, which is it better? > -- > Emanuele Petriglia (ema-pe) > > Sent from my mobile. Please excuse my brevity. > > On 23 January 2020 12:53:24 CET, Teodoro Santoni > wrote: >>Hi, >> >>2020-01-22 18:26 GMT+01:00, Emanuele Petriglia >>: >>> Hi! >>> >>> I would like to learn how to create a C graphical application without >>> using some toolkit for hobby. I know that there are two main >>libraries: >>> Xlib and xcb. The first is old but has a lot of documentation, the >>> second is newer but less documented than the first. So I was thinking >>to >>> learn Xlib and then xcb. >>> >>> I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye >>> published on 1994. I do not found any other recent book. Is it good >>to >>> start with Xlib even is it old? >>> >>> -- >>> Emanuele Petriglia (ema-pe) >>> >>> ___ >>> xorg@lists.x.org: X.Org support >>> Archives: http://lists.freedesktop.org/archives/xorg >>> Info: https://lists.x.org/mailman/listinfo/xorg >>> Your subscription address: %(user_address)s >>> >> >> >>[1] is a guide that should be fairly valid on xlib. > >From there you can afterwards embed xlib-xcb.h, gradually migrate from >>xlib to xcb reading the docs, read the guide from iotek for fonts in >>xcb without xft [2] or embed pango in your application. >> >>[1] https://tronche.com/gui/x/xlib/ >>[2] https://venam.nixers.net/blog/unix/2018/09/02/fonts-xcb.html > If the book, as I noticed on google, is the o'reilly manual, it should be as valid as Tronche's site if o'reilly hosts somewhere the example sources. But I never read that book, so YMMV. ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
There is also this tuto for xcb : https://xcb.freedesktop.org/tutorial/ and this doc for Xlib programming with many examples : http://csweb.cs.wfu.edu/~torgerse/Kokua/Irix_6.5.21_doc_cd/usr/share/Insight/library/SGI_bookshelves/SGI_Developer/books/XLib_PG/sgi_html/index.html Le 23/01/2020 à 12:53, Teodoro Santoni a écrit : Hi, 2020-01-22 18:26 GMT+01:00, Emanuele Petriglia : Hi! I would like to learn how to create a C graphical application without using some toolkit for hobby. I know that there are two main libraries: Xlib and xcb. The first is old but has a lot of documentation, the second is newer but less documented than the first. So I was thinking to learn Xlib and then xcb. I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye published on 1994. I do not found any other recent book. Is it good to start with Xlib even is it old? -- Emanuele Petriglia (ema-pe) ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s [1] is a guide that should be fairly valid on xlib. From there you can afterwards embed xlib-xcb.h, gradually migrate from xlib to xcb reading the docs, read the guide from iotek for fonts in xcb without xft [2] or embed pango in your application. [1] https://tronche.com/gui/x/xlib/ [2] https://venam.nixers.net/blog/unix/2018/09/02/fonts-xcb.html ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
Hi, thank you for the reply. I'll check the two links. Between the first link and the book, which is it better? -- Emanuele Petriglia (ema-pe) Sent from my mobile. Please excuse my brevity. On 23 January 2020 12:53:24 CET, Teodoro Santoni wrote: >Hi, > >2020-01-22 18:26 GMT+01:00, Emanuele Petriglia >: >> Hi! >> >> I would like to learn how to create a C graphical application without >> using some toolkit for hobby. I know that there are two main >libraries: >> Xlib and xcb. The first is old but has a lot of documentation, the >> second is newer but less documented than the first. So I was thinking >to >> learn Xlib and then xcb. >> >> I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye >> published on 1994. I do not found any other recent book. Is it good >to >> start with Xlib even is it old? >> >> -- >> Emanuele Petriglia (ema-pe) >> >> ___ >> xorg@lists.x.org: X.Org support >> Archives: http://lists.freedesktop.org/archives/xorg >> Info: https://lists.x.org/mailman/listinfo/xorg >> Your subscription address: %(user_address)s >> > > >[1] is a guide that should be fairly valid on xlib. >From there you can afterwards embed xlib-xcb.h, gradually migrate from >xlib to xcb reading the docs, read the guide from iotek for fonts in >xcb without xft [2] or embed pango in your application. > >[1] https://tronche.com/gui/x/xlib/ >[2] https://venam.nixers.net/blog/unix/2018/09/02/fonts-xcb.html ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
Re: How to start with X?
Hi, 2020-01-22 18:26 GMT+01:00, Emanuele Petriglia : > Hi! > > I would like to learn how to create a C graphical application without > using some toolkit for hobby. I know that there are two main libraries: > Xlib and xcb. The first is old but has a lot of documentation, the > second is newer but less documented than the first. So I was thinking to > learn Xlib and then xcb. > > I found this book about Xlib: "XLIB Programming Manual" of Adrian Nye > published on 1994. I do not found any other recent book. Is it good to > start with Xlib even is it old? > > -- > Emanuele Petriglia (ema-pe) > > ___ > xorg@lists.x.org: X.Org support > Archives: http://lists.freedesktop.org/archives/xorg > Info: https://lists.x.org/mailman/listinfo/xorg > Your subscription address: %(user_address)s > [1] is a guide that should be fairly valid on xlib. >From there you can afterwards embed xlib-xcb.h, gradually migrate from xlib to xcb reading the docs, read the guide from iotek for fonts in xcb without xft [2] or embed pango in your application. [1] https://tronche.com/gui/x/xlib/ [2] https://venam.nixers.net/blog/unix/2018/09/02/fonts-xcb.html ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s