Commit 06388096 authored by Guido Gunther's avatar Guido Gunther

docs: Document C file layout

Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent c765ae6a
Pipeline #55568 passed with stages
in 39 minutes and 11 seconds
......@@ -31,5 +31,24 @@ These are the differences:
- For callbacks we additionally allow for the `on_<action>` pattern e.g.
`on_nm_signal_strength_changed()` since this helps to keep the namespace
clean.
- Indivudual C files for GObjects should be structured as
- docstring
- property enum
- signal enum
- type definitions
- private methods and callbacks (these can also go at convenient
places above `phosh_object_constructed ()`
- phosh_object_set_properties ()
- phosh_object_get_properties ()
- phosh_object_constructed ()
- phosh_object_dispose ()
- phosh_object_finalize ()
- phosh_object_class_init ()
- phosh_object_init ()
- phosh_object_new ()
- other phosh_object public methods
The reason public methods go at the bottom is that they have declarations in
the header file.
[1]: https://source.puri.sm/Librem5/libhandy/blob/master/HACKING.md#coding-style
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment