XMREPTYPEREGISTER(3)
π XmRepTypeRegister β the representation-type-registering girlie π
okay so bestie, welcome to the manual page for XmRepTypeRegister(3) β it lives in the library call section, and it's lowkey the moment your fave representation type resource gets β¨officially on the listβ¨. sit down, grab a boba, we're doing this. π§
πΈ NAME πΈ
XmRepTypeRegister β a representation type manager function that registers a representation type resource. no cap, that's the whole job. π
β¨ SYNOPSIS β¨
#include <Xm/RepType.h>
XmRepTypeId XmRepTypeRegister(
String rep_type,
String *value_names,
unsigned char *values,
unsigned char num_values);
yes girl, that's the include, and yes, you need it. π«Ά
π¦ DESCRIPTION π¦
so like, XmRepTypeRegister registers a representation type resource with the representation type manager. the way that this works is: once you do it, all the features of the representation type management facility become available for the specified representation type. it's giving β¨unlockedβ¨. the function also installs a forward type converter β that's the little guy that converts string values into numerical representation type values. π₯
when the values argument is NULL, consecutive numerical values are just assumed, periodt. the order of the strings in the value_names array is what determines the numerical values for the resource. so for example: the first value name is 0 (zero), the second value name is 1, and so on. it's a line, bestie, and everyone's standing in order. π
if it is non-NULL, the values argument can be used to assign values to representation types that have nonconsecutive values, or that have duplicate names for the same value. cute, right? π BUT β and this is the tea β representation types registered in this manner will consume additional storage and will be slightly slower than representation types with consecutive values. so it's giving convenience tax. π
a representation type can only be registered once. if the same representation type name is registered more than once, the behavior is undefined. not vague-undefined, undefined-undefined. do not do this. π«
the function XmRepTypeAddReverse installs a reverse converter for a registered representation type. the reverse converter takes a representation type numerical value and returns the corresponding string value. π if the list of numerical values for a representation type contains duplicate values, the reverse converter uses the first name in the value_names list that matches the specified numeric value. so for example, if a value_names array has cancel, proceed, and abort, and the corresponding values array contains 0, 1, and 0, the reverse converter will return cancel instead of abort for an input value of 0. first come, first served, and cancel got there first. π
here's the whole cast of arguments, no one left out: π
rep_typeβ specifies the representation type name.value_namesβ specifies a pointer to an array of value names associated with the representation type. a value name is specified in lowercase characters without anXmprefix, and words within a name are separated with underscores. soxm_my_thing? no.my_thing? yes, slay. πvaluesβ specifies a pointer to an array of values associated with the representation type. a value in this array is associated with the value name in the corresponding position of thevalue_namesarray. they're matching, like a couple that coordinates outfits. π«Άnum_valuesβ specifies the number of entries in thevalue_namesandvaluesarrays.
π RETURN π
returns the identification number for the specified representation type. that's your receipt, bestie, hold onto it. π§Ύβ¨
π RELATED π
the whole friend group, go say hi:
XmRepTypeAddReverse(3)XmRepTypeGetId(3)XmRepTypeGetNameList(3)XmRepTypeGetRecord(3)XmRepTypeGetRegistered(3)XmRepTypeValidValue(3)
okay that's the page!! this one came straight out of the XmRepTypeRegister(library call) manual, and that's the vibe check passed, the end, periodt. ππ go register something (once. literally once. i'm watching 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