1/* 2 3Copyright (c) 1987, 1988 X Consortium 4 5Permission is hereby granted, free of charge, to any person obtaining 6a copy of this software and associated documentation files (the 7"Software"), to deal in the Software without restriction, including 8without limitation the rights to use, copy, modify, merge, publish, 9distribute, sublicense, and/or sell copies of the Software, and to 10permit persons to whom the Software is furnished to do so, subject to 11the following conditions: 12 13The above copyright notice and this permission notice shall be included 14in all copies or substantial portions of the Software. 15 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR 20OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22OTHER DEALINGS IN THE SOFTWARE. 23 24Except as contained in this notice, the name of the X Consortium shall 25not be used in advertising or otherwise to promote the sale, use or 26other dealings in this Software without prior written authorization 27from the X Consortium. 28 29*/ 30 31#include <X11/X.h> 32#include <X11/Xos.h> 33#include <X11/Xlib.h> 34#include <X11/Intrinsic.h> 35#include <X11/StringDefs.h> 36#include <X11/IntrinsicP.h> 37 38#include "globals.h" 39 40/* 41 * I am doing the "wrong" thing here by looking in the core field for the 42 * widget to get this info, the "right" thing to do is to do a XtGetValues 43 * to get this information. 44 */ 45 46/* Function Name: Width 47 * Description: finds the width of a widget. 48 * Arguments: w - the widget. 49 * Returns: the width of that widget. 50 */ 51 52int 53Width(Widget w) 54{ 55 return ((int) w->core.width); 56} 57 58/* Function Name: Height 59 * Description: finds the height of a widget. 60 * Arguments: w - the widget. 61 * Returns: the height of that widget. 62 */ 63 64int 65Height(Widget w) 66{ 67 return ((int) w->core.height); 68} 69 70/* Function Name: BorderWidth 71 * Description: finds the BorderWidth of a widget. 72 * Arguments: w - the widget. 73 * Returns: the BorderWidth of that widget. 74 */ 75 76int 77BorderWidth(Widget w) 78{ 79 return ((int) w->core.border_width); 80} 81