9c304a0090cd1dbbee7963e1dddf2e548a3807ce
[chise/xemacs-chise.git.1] / src / glyphs-msw.h
1 /* mswindows-specific glyphs and related.
2    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
3    Copyright (C) 1995 Board of Trustees, University of Illinois.
4    Copyright (C) 1995, 1996 Ben Wing
5    Copyright (C) 1995 Sun Microsystems, Inc.
6
7 This file is part of XEmacs.
8
9 XEmacs is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by the
11 Free Software Foundation; either version 2, or (at your option) any
12 later version.
13
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17 for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with XEmacs; see the file COPYING.  If not, write to
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA.  */
23
24 /* Synched up with:  Not in FSF. */
25
26 #ifndef _XEMACS_GLYPHS_MSW_H_
27 #define _XEMACS_GLYPHS_MSW_H_
28
29 #ifdef HAVE_MS_WINDOWS
30
31 #include <windows.h>
32 #include "glyphs.h"
33
34 /****************************************************************************
35  *                         Image-Instance Object                            *
36  ****************************************************************************/
37
38 struct mswindows_image_instance_data
39 {
40   HBITMAP bitmap;
41   HBITMAP mask;
42   HICON icon;
43 };
44
45 #define MSWINDOWS_IMAGE_INSTANCE_DATA(i) \
46 ((struct mswindows_image_instance_data *) (i)->data)
47
48 #define IMAGE_INSTANCE_MSWINDOWS_BITMAP(i) \
49      (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmap)
50 #define IMAGE_INSTANCE_MSWINDOWS_MASK(i) \
51      (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->mask)
52 #define IMAGE_INSTANCE_MSWINDOWS_ICON(i) \
53      (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->icon)
54
55 #define XIMAGE_INSTANCE_MSWINDOWS_BITMAP(i) \
56   IMAGE_INSTANCE_MSWINDOWS_BITMAP (XIMAGE_INSTANCE (i))
57 #define XIMAGE_INSTANCE_MSWINDOWS_MASK(i) \
58   IMAGE_INSTANCE_MSWINDOWS_MASK (XIMAGE_INSTANCE (i))
59 #define XIMAGE_INSTANCE_MSWINDOWS_ICON(i) \
60   IMAGE_INSTANCE_MSWINDOWS_ICON (XIMAGE_INSTANCE (i))
61
62 int
63 mswindows_resize_dibitmap_instance (struct Lisp_Image_Instance* ii,
64                                     struct frame* f,
65                                     int newx, int newy);
66 HBITMAP
67 mswindows_create_resized_bitmap (struct Lisp_Image_Instance* ii,
68                                  struct frame* f,
69                                  int newx, int newy);
70 HBITMAP
71 mswindows_create_resized_mask (struct Lisp_Image_Instance* ii,
72                                struct frame* f,
73                                int newx, int newy);
74 void
75 mswindows_initialize_image_instance_icon (struct Lisp_Image_Instance* image,
76                                           int cursor);
77
78 #endif /* HAVE_MS_WINDOWS */
79 #endif /* _XEMACS_GLYPHS_MSW_H_ */