# Notion: Notes for the module and patch writer

The Notion Team, `https://notionwm.net`
Tuomo Valkonen, tuomov at iki.fi

Notion: Notes for the module and patch writer
Copyright © 2011 The Notion Team.
Copyright © 2003–2004 Tuomo Valkonen.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.

The latest version of this document can be found at `https://notionwm.net`. Updates are welcome, preferably in the form of patches against the LATEX sources which can be found in the git repository at `git://github.com/raboof/notion-doc` (`https://github.com/raboof/notion-doc`)

### Abstract:

This document is an unorganized collection of notes for those who want to write modules or patches to Notion.

- Contents
- 1 Class and object hierarchies
  - 1.1 Class hierarchy
    - 1.1.1 Partial Notioncore, mod_tiling and mod_query class hierarchy
    - 1.1.2 The core classes
    - 1.1.3 Run-time access to types
  - 1.2 Object hierarchies: WRegion parents and managers
    - 1.2.1 Parent–child relations
      - 1.2.1.1 Most common parent–child relations
    - 1.2.2 Manager–managed relations
      - 1.2.2.1 Most common manager–managed relations
  - 1.3 Summary
- 2 Object system implementation
  - 2.1 Object creation
  - 2.2 Safe references
  - 2.3 Dynamic dispatch
- 3 The Lua interface
  - 3.1 Supported types
  - 3.2 Exporting functions
  - 3.3 Calling Lua functions and code
  - 3.4 Miscellaneous notes
- 4 Modules
  - 4.1 Anatomy
    - 4.1.1 The lua part
- 5 Miscellaneous design notes
  - 5.1 Destroying WObj's
  - 5.2 Method signatures
    - 5.2.1 The types char* and const char* as function parameters and return values
    - 5.2.2 Use of pointers
  - 5.3 Encoding
- 6 C coding style
  - 6.1 Whitespace
  - 6.2 Braces
  - 6.3 Names
  - 6.4 Miscellaneous
- A. GNU Free Documentation License
- B. Full class hierarchy visible to Lua-side
- Index
- About this document ...