This defines the callback format. Each callback should return void and take an argument of struct s3d_evt *. Callbacks can be defined with s3d_set_callback().
An object got clicked (when you set the flag S3D_OF_SELECTABLE), buf will contain the object id of the object which got clicked (uint32_t)
A key was pressed, buf will contain a keycode. use #include <s3d_keysym.h> to have the keycodes available. buf is a 2 byte unsigned short keycode.
A mouse button was clicked. Use struct s3d_but_info on buf to get more info.
deprecated, will use S3D_EVENT_OBJ_INFO
Something happened to an object. This can happen if the camera was moved, the mouse (pointer) was moved or an application appeared/changed in the mcp
As the name suggests, those will only happen to the MCP. This tells it about new/changed application object. struct mcp_object can be used on buf. To be removed in the future.
As the name suggests, those will only happen to the MCP. This tells it about deleted application object. struct mcp_object can be used on buf. To be removed in the future.
Server sent the quit signal, or the connection was terminated. Usually, this is only processed internally.
/* a callback handler could look like this: */ void my_key_handler(struct s3d_evt *event_data) { ... }
Objects can have several flags to change their behavior in the server and can be set with s3d_flags_on() and s3d_flags_off()
default:off
Obviously, if this flag is toggled the user can see it, if not it will be hidden. ;)
When an object is created it's turned off, so you will be able push your geometry data and turn it on after you're done. That avoids flickering and stuff.
default:off
When this is toggled on, you will receive click events. Don't use it if you don't need it, it will eat performance.
default:off
Placeholder for pointer (onmouseover-event enabler) events. Not implemented yet.