1 /***************************************************************************** 2 Major portions of this software are copyrighted by the Medical College 3 of Wisconsin, 1994-2000, and are released under the Gnu General Public 4 License, Version 2. See the file README.Copyright for details. 5 ******************************************************************************/ 6 7 #ifndef _MCW_XIM_HEADER_ 8 #define _MCW_XIM_HEADER_ 9 10 #include <stdio.h> 11 #include <stdlib.h> 12 #include <string.h> 13 14 #include <X11/X.h> 15 #include <X11/Intrinsic.h> 16 17 #include "mrilib.h" 18 #include "coxplot.h" 19 #include "display.h" 20 21 #ifdef __cplusplus 22 extern "C" { /* care of Greg Balls 7 Aug 2006 [rickr] */ 23 #endif 24 25 extern void MCW_kill_XImage( XImage * ) ; 26 extern XImage * mri_to_XImage( MCW_DC * , MRI_IMAGE * ) ; 27 extern XImage * resize_XImage( MCW_DC * , XImage * , int , int ) ; 28 extern MRI_IMAGE * XImage_to_mri( MCW_DC * , XImage * , int ) ; 29 30 extern XImage * pixar_to_XImage( MCW_DC * , int,int , Pixel * ) ; 31 extern XImage * rgb_to_XImage ( MCW_DC * , MRI_IMAGE * ) ; 32 extern XImage * rgba_to_XImage( MCW_DC * , MRI_IMAGE * ) ; /* 13 Feb 2020 */ 33 34 extern void rectzero_XImage( MCW_DC *dc , XImage *image , 35 int x1, int y1, int x2, int y2 ) ; /* 25 Jun 2013 */ 36 37 #define X2M_USE_CMAP (1<<0) /* masks for XImage_to_mri() 3rd arg */ 38 #define X2M_FORCE_RGB (1<<1) 39 40 extern int ISQ_snapfile( Widget w ) ; /* 25 Jun 2003 */ 41 extern int ISQ_snapfile2( Widget w, char *fout ) ; /* 3 Nov. 2014 */ 42 extern MRI_IMAGE * SNAP_grab_image( Widget , MCW_DC * ) ; 43 44 extern void memplot_to_X11_set_DC( MCW_DC *dc ) ; /* 30 Apr 2012 */ 45 extern void memplot_to_X11_funfunfun( Display *dpy , Window w , MEM_plotdata *mp , 46 int start , int end , int mask ) ; 47 48 #undef X11_SET_NEW_PLOT 49 #define X11_SET_NEW_PLOT memplot_to_X11_set_substitute(memplot_to_X11_funfunfun) 50 51 #undef X11_SET_OLD_PLOT 52 #define X11_SET_OLD_PLOT memplot_to_X11_set_substitute(NULL) 53 54 #undef X11_GET_PLOT_FUNC 55 #define X11_GET_PLOT_FUNC memplot_to_X11_get_substitute() 56 57 #undef X11_SET_PLOT_FUNC 58 #define X11_SET_PLOT_FUNC(pf) memplot_to_X11_set_substitute(pf) 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif /* _MCW_XIM_HEADER_ */ 65