summaryrefslogtreecommitdiff
path: root/docs/guide
diff options
context:
space:
mode:
authorTACIXAT <982598+TACIXAT@users.noreply.github.com>2019-11-26 15:31:01 -0800
committerJordan <jordan@psifertex.com>2019-12-04 15:04:52 -0500
commit572e5448a8a58665d8ddd68800b6620e5ecc0509 (patch)
tree4b7e67052cbb277e2db67b8f593da4575a56ecee /docs/guide
parent2bc5d50b23a23183dbb53a1b3fca5022d3251a68 (diff)
Content for Types & Structures user guide page.
*insert passive aggressive snapchat of empty docs page here*
Diffstat (limited to 'docs/guide')
-rw-r--r--docs/guide/type.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/guide/type.md b/docs/guide/type.md
index 65121864..2ba5ce36 100644
--- a/docs/guide/type.md
+++ b/docs/guide/type.md
@@ -1,2 +1,42 @@
# Types and Structures
+The types view can be opened from the top menu `View > Types`. From here you can create structures, unions, and types using C-style syntax.
+
+## Shortcuts and Attributes
+
+The creation shortcuts in this view are as follows.
+
+* `S` - Create new structure
+* `I` - Create new type
+* `Shift+S` - Creating a new union
+
+The shortcuts for editing are as follows.
+
+* `Y` - Edit type / field
+* `N` - Rename type / field
+* `L` - Set structure size
+* `U` - undefine field.
+
+Structs support the attribute `__packed` to indicate that there is no padding.
+
+## Examples
+
+```C
+enum _flags
+{
+ F_X = 0x1,
+ F_W = 0x2,
+ F_R = 0x4
+};
+```
+
+```C
+struct Header __packed
+{
+ char *name;
+ uint32_t version;
+ void (* callback)();
+ uint16_t size;
+ enum _flags flags;
+};
+```