For some very complex data structure, it's very difficult and inefficient to map them into perl array or hash table. We may simply encupsulate it inside a SV. It's called 'boxed' in DEFL. If you don't need to touch the data inside the structure, it can be used to tranfer data between different functions. For example, you can get style from one function and send the style to another one.
However, if you still need to use some of the members of the structre, you can define some access functions in XS codes. For example, the GtkStyle is defined as boxed object, but we define a lot of access functions, such as white(),fg,bg and etc, to get and set the members of the structure. In fact, it's more efficient compare to acess by using typemap of XS.