XMOBJECTATPOINT(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

✨ XmObjectAtPoint ✨

okay bestie, gather round, because today we're talking about XmObjectAtPoint β€” a lil library call from the Xm toolkit that figures out which child intersects or comes closest to a specified point. yes she's a detective. yes she ate. πŸ’…


🌸 SYNOPSIS 🌸

#include <Xm/Xm.h>
Widget XmObjectAtPoint(
Widget widget,
Position x,
Position y);

πŸ¦‹ DESCRIPTION πŸ¦‹

so XmObjectAtPoint goes snooping through the child list of the manager widget you hand it, and returns the child that's most closely associated with the x,y coordinate pair you gave it. literally her whole job. iconic behavior honestly. ✨

for the typical Motif manager widget, XmObjectAtPoint uses these rules to decide which object comes back:

  • if one child intersects x,y, XmObjectAtPoint returns the widget ID of that child. slay, no competition. πŸŽ€
  • if more than one child intersects x,y, XmObjectAtPoint returns the widget ID of the visible child. main character energy only. πŸ‘‘
  • if no child intersects x,y, XmObjectAtPoint returns NULL. bestie is empty-handed, it's giving nothing. 😭
⚠️ okay so important: those rules are only general. in fact, each manager widget is free to define "most closely associated" as it desires. for example, if no child intersects x,y, a manager might return the child closest to x,y. so don't come for me if your manager has its own opinions, k? each one gets to pick its own vibe. 🧚

now the parameters, bestie, one by one, no skipping:

  • widget β€” specifies a manager widget. (the one we're snooping inside, obvs πŸ•΅οΈβ™€οΈ)
  • x β€” specifies the x-coordinate about which you are seeking child information. the x-coordinate must be specified in pixels, relative to the left side of manager. pixels, babe, not vibes. πŸ“
  • y β€” specifies the y-coordinate about which you are seeking child information. the y-coordinate must be specified in pixels, relative to the top side of manager. same deal, top not bottom. 🫢

πŸ’– RETURN πŸ’–

returns the child of manager most closely associated with x,y. πŸ₯° and if none of its children are sufficiently associated with x,y, returns NULL. it's giving "no thoughts, head empty" and that's valid. πŸ’€



and that's the whole page, bestie!! this lil write-up is XmObjectAtPoint(library call) β€” yes, same name as the title, she's consistent like that β€” straight out of the library call section of the manual. mwah. πŸŽ€πŸ’œπŸ¦‹πŸŒΈβœ¨

πŸ’Œ sign-off from your favorite Unix girlie: XmObjectAtPoint(library call) β€” library call, periodt. go forth and find your children. 🌟