XMCONVERTSTRINGTOUNITS(3)
π XmConvertStringToUnits π
okay bestie, we're diving into XmConvertStringToUnits, a library call from the Xm crew. it's a function that converts a string specification to a unit value, and honestly? it's giving β¨measurement eraβ¨
πΈ NAME πΈ
XmConvertStringToUnits β a function that converts a string specification to a unit value π
π¦ SYNOPSIS π¦
#include <Xm/Xm.h>
int XmConvertStringToUnits(
Screen *screen,
String spec,
int orientation,
int to_type,
XtEnum *parse_error);
π DESCRIPTION π
XmConvertStringToUnits converts a string specification value and returns the converted value as the return value from the function. literally the whole vibe. it uses the specified screen's resolution to compute the number of units for the string specification. no cap. π₯
screenβ specifies the screen whose resolution is to be used for the computation. πspecβ specifies the string, in<floating value><unit>format, to be converted. that angle-bracket format is the moment, don't freestyle it. πorientationβ specifies whether the converter uses the horizontal or vertical screen resolution when performing the conversion. this parameter can have values ofXmHORIZONTALorXmVERTICAL. pick a lane, bestie π«Άto_typeβ converts the value to the unit type specified. refer to theXmNunitTyperesource of theXmGadget,XmManager, orXmPrimitivereference page. this parameter can have one of the following values:XmPIXELSβ the returned value will be the number of pixels. β¨XmMILLIMETERSβ the returned value will be the number of millimeters.Xm100TH_MILLIMETERSβ the returned values will be the number of 1/100 millimeters.XmCENTIMETERSβ the returned values will be the number of centimeters.XmINCHESβ the returned values will be the number of inches.Xm1000TH_INCHESβ the returned values will be the number of 1/100 inches. π (yes that's what it says, we report the facts here)XmPOINTSβ the returned value will be the number of points. a point is a text processing unit defined as 1/72 of an inch. πXm100TH_POINTSβ the returned values will be the number of 1/100 points.XmFONT_UNITSβ all values provided to the widget are treated as font units. a font unit has horizontal and vertical components. these are the values of theXmScreenresourcesXmNhorizontalFontUnitandXmNverticalFontUnit. π§Xm100TH_FONT_UNITSβ all values provided to the widget are treated as 1/100 of a font unit. a font unit has horizontal and vertical components. these are the values of theXmScreenresourcesXmNhorizontalFontUnitandXmNverticalFontUnit.
parse_errorβ specifies if a parsing error occurred. this is set to a value ofTrueindicates that an error occurred, a value ofFalseto indicate no error. so check it, bestie, don't just vibe past it π
β RETURN β
returns the converted value. π
but listen β if a NULL screen, incorrect orientation, or incorrect unit_type is supplied as parameter data, or if a parsing error occurred, 0 (zero) is returned.
so like...0could be a real answer OR a "something went wrong" answer. it's giving ambiguous main character energy. check yourparse_error, fr fr. π
π RELATED π
and that's the whole page, bestie!! π«Άβ¨ this was XmConvertStringToUnits(library call) β a library call from the Xm fam, no date on the original footer, just the title flexing itself back at us. obsessed. go forth and convert responsibly. πππΈ
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms