]> git.street.me.uk Git - andy/viking.git/blame - doc/dev/Track-Tool-Interfaces
Update mtime of up-to-date tiles
[andy/viking.git] / doc / dev / Track-Tool-Interfaces
CommitLineData
50a14534
EB
1static struct trwlayer_interface = {
2 ...,
3 trwlayer_tools,
4 sizeof ( trwlayer_tools ) / sizeof ( LayerTool ), /* gshort */
5};
6
7static struct trwlayer_tools = {
8 { "Add Waypoint", trwlayer_add_wp },
9 { "Add Track", trwlayer_add_track },
10};
11
12----
13
14Tools Adding:
15ItemFactory args:
161) VikWindow
172) 4-byte variable containing ID and ID of tool.
18
19struct VikLayerToolId {
20 gshort layer_id;
21 gshort tool_id;
22};
23
24Then we just need to assert (or #warning, etc.) that
25sizeof(VikLayerToolId) <= sizeof(gpointer)
26OR, I could use guint8 to be on the safe size, for a maximum of 256
27layer types. But I think guint16 will be file.