summaryrefslogtreecommitdiff
path: root/lib/libXpm/man/XpmCreateData.man
blob: 97d7b14b3d1108894b32d6c886cba553a394583d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.\" Copyright (C) 1989-95 GROUPE BULL
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a copy
.\" of this software and associated documentation files (the "Software"), to
.\" deal in the Software without restriction, including without limitation the
.\" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
.\" sell copies of the Software, and to permit persons to whom the Software is
.\" furnished to do so, subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
.\" GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
.\" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" Except as contained in this notice, the name of GROUPE BULL shall not be
.\" used in advertising or otherwise to promote the sale, use or other dealings
.\" in this Software without prior written authorization from GROUPE BULL.
.\"
.hw XImage
.TH XpmCreateData __libmansuffix__ __xorgversion__ "libXpm functions"
.SH NAME
XpmCreateData \- create an Data structure

.SH SYNOPSIS
.nf
.HP
.BI "int XpmCreateDataFromImage(Display *" display ", char ***" data_return ,
.BI "XImage *" image ", XImage *" shapeimage ", XpmAttributes *" attributes );
.HP
.BI "int XpmCreateDataFromPixmap(Display *" display ", char ***" data_return ,
.BI "Pixmap " pixmap ", Pixmap " shapemask ", XpmAttributes *" attributes );
.HP
.BI "int XpmCreateDataFromXpmImage(char ***" data_return ", XpmImage *" image ,
.BI "XpmInfo *" info );
.fi

.SH ARGUMENTS

.IP \fIdisplay\fP li
Specifies the connection to the X server.
.IP \fIdata_return\fP li
Returns the data which is created.
.IP \fIpixmap\fP li
Specifies the pixmap.
.IP \fIshapemask\fP li
Specifies the shape mask pixmap.
.IP \fIattributes\fP li
Specifies the location of a structure containing information (or NULL).
.IP \fIinfo\fP li
Specifies the location of a structure to get information.
.IP \fIimage\fP li
Specifies the image

.SH DESCRIPTION
.SS XpmCreateDataFromImage
.PP
In some cases, one may want to create an XPM data from an XImage, to do so use
.BR XpmCreateDataFromImage ().
The
.BR XpmCreateDataFromImage ()
function exactly works as
.BR XpmWriteFileFromImage (__libmansuffix__)
does and returns the same way.
It just writes to a single block malloc’ed data instead of to a file.
It is the caller’s responsibility to free the data, using
.BR XpmFree (__libmansuffix__)
when finished.

.SS XpmCreateDataFromPixmap
.PP
.BR XpmCreateDataFromPixmap ()
creates an XPM data from a Pixmap.
The
.BR XpmCreateDataFromPixmap ()
function uses
.BR XGetImage (__libmansuffix__)
to get from the given pixmaps
the related X images which are passed to
.BR XpmCreateDataFromImage ().
Then it destroys the created images using
.BR XDestroyImage (__libmansuffix__).
.BR XpmCreateDataFromPixmap ()
returns the same errors as
.BR XpmCreateDataFromImage ().

.SS XpmCreateDataFromXpmImage
.PP
.BR XpmCreateDataFromXpmImage ()
creates an XPM data from an XpmImage.
The
.BR XpmCreateDataFromXpmImage ()
function writes out the given image to a single block malloc’ed data in XPM format.
If insufficient working storage is allocated, it returns
.BR XpmNoMemory ,
and returns
.B XpmSuccess
on success.
If the passed XpmInfo structure pointer is not NULL,
.BR XpmCreateDataFromXpmImage ()
looks for the following attributes:
XpmExtensions, and XpmHotspot, and writes the related information out as well.
It is the caller’s responsibility to free the data, using
.BR XpmFree (__libmansuffix__)
when finished.

.SH "SEE ALSO"
.ad l
.nh
.BR XpmFree (__libmansuffix__),
.BR XpmWriteFileFromImage (__libmansuffix__)