XMLISTGETSELECTEDPOS(3)
π XmListGetSelectedPos π
okay bestie, welcome to the XmListGetSelectedPos page β that's a library call, and she's here to spill the tea on how to find out which items in your List are actually selected. π
β¨ NAME β¨
XmListGetSelectedPos β a List function that returns the position of every selected item in the list. literally her whole personality. π
πΈ SYNOPSIS πΈ
#include <Xm/List.h>
Boolean XmListGetSelectedPos(
Widget widget,
int **position_list,
int *position_count);
π¦ DESCRIPTION π¦
okay so first thing, and I need you to hear me on this: this routine is obsolete. she's giving legacy, she's giving deprecated era, and she has been replaced by calling XtGetValues for the List resources XmNselectedPositions and XmNselectedPositionCount. so likeβ¦ she still works, but she's not the moment anymore, iykyk. π
XmListGetSelectedPos is a Boolean function that returns an array of the positions of the selected items in a List.
widgetβ specifies the ID of the List widget. that's the one you're snooping on bestie πposition_listβ returns an array of the positions of the selected items in the List. and the counting is not zero-indexed, bestie, it starts at 1: the position of the first item in the list is1; the position of the second item is2; and so on. when the return value isTrue,XmListGetSelectedPosallocates memory for this array. the caller is responsible for freeing this memory. no cap, that's on you. the caller can recover the allocated memory by callingXtFree. free her or she will haunt your process fr fr πposition_countβ returns the number of elements in theposition_list. the receipts count. π§Ύ
for a complete definition of List and its associated resources, see XmList(3).
β RETURN β
returns True if the list has any selected items, and False if it does not. that's it. that's the whole vibe check. β
π«Ά RELATED π«Ά
XmListGetSelectedPos(library call) β that's the manual name up top, and yeah, the footer just says it again, so consider this the cute sign-off: same name, library call, and if you see a date and source/version down there, that's just her little timestamp moment. slay, you read the whole page, I'm obsessed with you πβ¨π
π¦ 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