I have come accross a datatype called Dimension in some Motif windows code.
Does any one know where this data type is define?
i.e. is it a Motif data type or standard C type ?
I have come accross a datatype called Dimension in some Motif windows code.
Does any one know where this data type is define?
i.e. is it a Motif data type or standard C type ?
Ivan
It's not a C data type. It's something they've defined some place. It's simply amazing what you can do with five seconds and Google. See?
Quzah.ERROR 27. X Toolkit data types.
You should be careful about interchanging integer-based X Toolkit types. For example, the Dimension data type is a 16 bit unsigned integer and the Position data type is a 16 bit signed integer. When you mix the two, the C language's type promotion rules apply, which may not be what you were expecting.
Also, when getting Position and Dimension resource values, be sure to pass addresses of variables of the correct types to XtGetValues(). In some implementations, these are 16 bit integers. Passing the address of a 32 bit integer may cause the remaining 16 bits to be filled with invalid data, thus producing incorrect results in your program.
Hope is the first step on the road to disappointment.