1.\" $NetBSD: panel_userptr.3,v 1.2 2015/10/28 02:23:50 uwe Exp $ 2.\" 3.\" Copyright (c) 2015 Valery Ushakov 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" 26.Dd October 28, 2015 27.Dt PANEL_USERPTR 3 28.Os 29.Sh NAME 30.Nm set_panel_userptr , 31.Nm panel_userptr 32.Nd user data associated with panels 33.Sh LIBRARY 34.Lb libpanel 35.Sh SYNOPSIS 36.In panel.h 37.\" 38.Ft int 39.Fn set_panel_userptr "PANEL *p" "char *data" 40.\" 41.Ft char * 42.Fn panel_userptr "PANEL *p" 43.\" 44.Sh DESCRIPTION 45The function 46.Fn set_panel_userptr 47can be used to associate arbitrary user data with a panel. 48.Pp 49The data associated with a panel can be obtained with 50.Fn panel_userptr . 51.Sh RETURN VALUES 52Functions returning pointers will return 53.Dv NULL 54if an error is detected. 55The functions that return an int will return one of the following 56values: 57.Pp 58.Bl -tag -width ".Dv ERR" -compact 59.It Dv OK 60The function completed successfully. 61.It Dv ERR 62An error occurred in the function. 63.El 64.Sh SEE ALSO 65.Xr panel 3 66