| Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
| Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
| Moderator: | STAR::VATNE |
| Created: | Mon Oct 30 1989 |
| Last Modified: | Mon Dec 31 1990 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 3726 |
| Total number of notes: | 19516 |
When calls such as XCreateImage are called, does DECwindows expect the
memory to already be allocated or does it allocate the memory itself?
I have a program which declares
Local Image_struct : X$Image
Then calls X$CREATE_IMAGE passing Image_struct as one of its
parameters. Is this correct or should I use REF X$IMAGE to keep from
having the memory allocated twice?
I thought what I had was right but when questioned I checked the Xlib
books. They say that the call to X$Create_Image alocates and
initializes the image data structure minus the image memory itself.
Now I'm really confused.
Thanks,
Irene
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 3536.1 | OXNARD::KLEE | Ken Lee | Fri Oct 26 1990 13:50 | 9 | |
According to the Xlib manual, "The XCreateImage function allocates the
memory needed for an XImage structure for the specified display but
does not allocate space for the image itself." One of the arguments to
XCreateImage is a pointer to the image data, which you must allocate
and define separately. Note, however, that XDestroyImage destroys both
the XImage structure and the user image data.
Ken
| |||||
| 3536.2 | But does DECwindows do what the manual says? | SITBUL::MCCARTNEY | Fri Oct 26 1990 14:07 | 7 | |
I know the manual says the call allocates the memory. I also know that
everytime we've tried to use REF X$IMAGE and count on X to do the
allocation we get access violations. We have no problem with the
X$DESTROY_IMAGE call. I'm trying to find out if what the manual is
saying is truly what DECwindows is doing.
Irene
| |||||
| 3536.3 | MIT binding is different from VAX binding | OXNARD::KLEE | Ken Lee | Fri Oct 26 1990 15:05 | 6 |
The DECwindows MIT binding does create the image structure (using the
user's data). The VAX binding expects the structure to be passed in as
a function argument and does not create the structure.
Ken
| |||||