SDL API Writers Guide
Just a rough guide to make all the function and structure pages look the same.
Please use FunctionTemplate or StructureTemplate templates when creating a new API page.
Most of the formatting is self-explanatory in the templates...
Otherwise here are some specifics:
When writing notes make the "Note:" part bold, but the actual note in normal.
'''Note:''' Here is the note.
When referring to the function that you're documenting, make them fixed width.
`SDL_ThisFunction` rocks!.
- When referring a function please link them.
Please use ["SDL_Init"] before calling this function.
When writing some inline code in your description, make the code snippets fixed width.
The function may return `NULL`, unless called with `SDL_Function(foo)`.
- When creating tables in Structure Data, make the first column's text bold. Make the tables 100% width.
== Structure Data == ||<tablewidth="100%">'''flags'''||Surface flags|| ||'''format'''||Pixel format|| ||'''w, h'''||Width and height of the surface||
Otherwise, when creating tables make them 100% width. And keep in mind to make the code bits fixed width.
||<tablewidth="100%">`SDL_SWSURFACE`||Create the video surface in system memory|| ||`SDL_HWSURFACE`||Create the video surface in video memory|| ||`SDL_ASYNCBLIT`||Enables the use of asynchronous updates of the display surface. This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.||
- To add a comment (for examples etc) make sure the Comments heading has been made, then make a heading for yourself:
== Comments ==
=== Reading one pixel from a video surface ===
''by John Doe - email at moo dot com''
Please lock your surface before calling this function.
{{{
int getpixel(int x, int y) {
etc
}
}}.}- It should come out like this:
Comments
Reading one pixel from a video surface
by John Doe - email at moo dot com
Please lock your surface before calling this function.
int getpixel(int x, int y) {
etc
}