1 /*
2  * Motif
3  *
4  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 /*
25  * HISTORY
26  */
27 /* $XConsortium: ImageCachI.h /main/7 1996/01/29 13:19:43 daniel $ */
28 #ifndef _XmImageCacheI_h
29 #define _XmImageCacheI_h
30 
31 #include <Xm/XmP.h>
32 
33 /* this name is used by XmeGetPixmapData to cache a pixmap in the
34    pixmap cache with no associated name. _XmCachePixmap knows about it
35    and will not add this one in the pixmap_data cache because it is a
36    _name_ based pixmap cache used during conversion */
37 #define DIRECT_PIXMAP_CACHED ""
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /********    Private Function Declarations for ImageCache.c    ********/
44 
45 extern Boolean _XmInstallImage(
46                         XImage *image,
47                         char *image_name,
48                         int hot_x,
49                         int hot_y) ;
50 extern Boolean _XmGetImage(
51                         Screen *screen,
52                         char *image_name,
53                         XImage **image) ;
54 extern Boolean _XmCachePixmap(
55 			      Pixmap pixmap,
56 			      Screen *screen,
57 			      char *image_name,
58 			      Pixel foreground,
59 			      Pixel background,
60 			      int depth,
61 			      Dimension width,
62 			      Dimension height) ;
63 extern Pixmap _XmGetColoredPixmap(Screen *screen,
64 				  char *image_name,
65 				  XmAccessColorData acc_color,
66 				  int depth,
67 #if NeedWidePrototypes
68 				  int only_if_exists) ;
69 #else
70 				  Boolean only_if_exists) ;
71 #endif /* NeedWidePrototypes */
72 
73 extern Boolean _XmGetPixmapData(
74 		   Screen *screen,
75 		   Pixmap pixmap,
76 		   char **image_name,
77 		   int *depth,
78 		   Pixel *foreground,
79 		   Pixel *background,
80 		   int *hot_x,
81 		   int *hot_y,
82 		   unsigned int *width,
83 		   unsigned int *height) ;
84 extern Boolean _XmInImageCache(
85 			       String image_name);
86 
87 extern Pixmap _XmGetScaledPixmap(
88     Screen *screen,
89     Widget widget,
90     char *image_name,
91     XmAccessColorData acc_color,
92     int depth,
93 #if NeedWidePrototypes
94     int only_if_exists,
95 #else
96     Boolean only_if_exists,
97 #endif /* NeedWidePrototypes */
98     double scaling_ratio);
99 
100 extern void _XmPutScaledImage (
101     Display*		 display ,
102     Drawable		 d ,
103     GC			 gc ,
104     XImage*		 src_image ,
105     int			 src_x ,
106     int			 src_y ,
107     int			 dest_x ,
108     int			 dest_y ,
109     unsigned int	 src_width ,
110     unsigned int	 src_height,
111     unsigned int	 dest_width ,
112     unsigned int	 dest_height);
113 
114 extern void _XmCleanPixmapCache(Screen * screen, Widget shell);
115 
116 /* for Xm.h */
117 extern Pixmap XmGetScaledPixmap(
118     Widget widget,
119     char *image_name,
120     Pixel foreground,
121     Pixel background,
122     int depth,
123     double scaling_ratio);
124 
125 /********    End Private Function Declarations    ********/
126 
127 #ifdef __cplusplus
128 }  /* Close scope of 'extern "C"' declaration which encloses file. */
129 #endif
130 
131 #endif /* _XmImageCacheI_h */
132 /* DON'T ADD ANYTHING AFTER THIS #endif */
133