xcffib icon indicating copy to clipboard operation
xcffib copied to clipboard

Add __doc__ to classes and methods

Open sapoturge opened this issue 6 years ago • 1 comments

For people trying to use this library while learning how to do xcb programming, having no documentation anywhere makes doing simple things arbitrarily difficult. As an example, the ExposeEvent and ClientMessageEvent classes store the target window in event.window, but KeyPressEvent and MouseButtonEvent store the window in event.event. This information can be found online if you look hard enough, but it would be really nice if a docstring could be added to the classes explaining the attributes. The xml files do have documentation comments for some things, so those could be combined into Python docstrings when they exist.

sapoturge avatar Jun 28 '19 21:06 sapoturge

As another user who is also just learning xcb, I agree better docs would be nice. I took a glance at the .xml files, and it looks like a lot of it is undocumented there and there doesn't appear to be structured documentation. For example, this appears to be the source-of-truth on documentation of the X11 protocol and its documentation of XInput is just a text file that doesn't appear to have any structured reference to the source. Of course, maybe that means xcb-proto should be fixed to have better docs...

dperelman avatar Jul 08 '19 05:07 dperelman