267
|
1 /* mswindows-specific glyphs and related.
|
384
|
2 Copyright (C) 1998 Andy Piper
|
267
|
3
|
|
4 This file is part of XEmacs.
|
|
5
|
|
6 XEmacs is free software; you can redistribute it and/or modify it
|
|
7 under the terms of the GNU General Public License as published by the
|
|
8 Free Software Foundation; either version 2, or (at your option) any
|
|
9 later version.
|
|
10
|
|
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 for more details.
|
|
15
|
|
16 You should have received a copy of the GNU General Public License
|
|
17 along with XEmacs; see the file COPYING. If not, write to
|
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
19 Boston, MA 02111-1307, USA. */
|
|
20
|
|
21 /* Synched up with: Not in FSF. */
|
|
22
|
412
|
23 #ifndef _XEMACS_GLYPHS_MSW_H_
|
|
24 #define _XEMACS_GLYPHS_MSW_H_
|
267
|
25
|
|
26 #ifdef HAVE_MS_WINDOWS
|
|
27
|
|
28 #include <windows.h>
|
|
29 #include "glyphs.h"
|
|
30
|
|
31 /****************************************************************************
|
|
32 * Image-Instance Object *
|
|
33 ****************************************************************************/
|
|
34
|
|
35 struct mswindows_image_instance_data
|
|
36 {
|
424
|
37 HBITMAP* bitmaps;
|
272
|
38 HICON icon;
|
267
|
39 };
|
|
40
|
|
41 #define MSWINDOWS_IMAGE_INSTANCE_DATA(i) \
|
|
42 ((struct mswindows_image_instance_data *) (i)->data)
|
|
43
|
|
44 #define IMAGE_INSTANCE_MSWINDOWS_BITMAP(i) \
|
424
|
45 (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmaps[0])
|
|
46 #define IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE(i,slice) \
|
|
47 (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmaps[slice])
|
|
48 #define IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES(i) \
|
|
49 (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmaps)
|
272
|
50 #define IMAGE_INSTANCE_MSWINDOWS_MASK(i) \
|
424
|
51 (HBITMAP)(IMAGE_INSTANCE_PIXMAP_MASK (i))
|
272
|
52 #define IMAGE_INSTANCE_MSWINDOWS_ICON(i) \
|
|
53 (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->icon)
|
267
|
54
|
|
55 #define XIMAGE_INSTANCE_MSWINDOWS_BITMAP(i) \
|
|
56 IMAGE_INSTANCE_MSWINDOWS_BITMAP (XIMAGE_INSTANCE (i))
|
424
|
57 #define XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE(i,slice) \
|
|
58 IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE (XIMAGE_INSTANCE (i,slice))
|
|
59 #define XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES(i) \
|
|
60 IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (XIMAGE_INSTANCE (i))
|
267
|
61 #define XIMAGE_INSTANCE_MSWINDOWS_MASK(i) \
|
|
62 IMAGE_INSTANCE_MSWINDOWS_MASK (XIMAGE_INSTANCE (i))
|
272
|
63 #define XIMAGE_INSTANCE_MSWINDOWS_ICON(i) \
|
|
64 IMAGE_INSTANCE_MSWINDOWS_ICON (XIMAGE_INSTANCE (i))
|
267
|
65
|
278
|
66 int
|
412
|
67 mswindows_resize_dibitmap_instance (struct Lisp_Image_Instance* ii,
|
278
|
68 struct frame* f,
|
|
69 int newx, int newy);
|
286
|
70 HBITMAP
|
412
|
71 mswindows_create_resized_bitmap (struct Lisp_Image_Instance* ii,
|
286
|
72 struct frame* f,
|
|
73 int newx, int newy);
|
|
74 HBITMAP
|
412
|
75 mswindows_create_resized_mask (struct Lisp_Image_Instance* ii,
|
286
|
76 struct frame* f,
|
|
77 int newx, int newy);
|
278
|
78 void
|
412
|
79 mswindows_initialize_image_instance_icon (struct Lisp_Image_Instance* image,
|
282
|
80 int cursor);
|
278
|
81
|
384
|
82 #define WIDGET_INSTANCE_MSWINDOWS_HANDLE(i) \
|
|
83 (HWND) (IMAGE_INSTANCE_SUBWINDOW_ID (i))
|
|
84
|
|
85 #define XWIDGET_INSTANCE_MSWINDOWS_HANDLE(i) \
|
|
86 WIDGET_INSTANCE_MSWINDOWS_HANDLE (XIMAGE_INSTANCE (i))
|
|
87
|
424
|
88 struct mswindows_subwindow_data
|
|
89 {
|
|
90 HWND clip_window;
|
|
91 };
|
|
92
|
|
93 #define MSWINDOWS_SUBWINDOW_DATA(i) \
|
|
94 ((struct mswindows_subwindow_data *) (i)->data)
|
|
95
|
|
96 #define IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW(i) \
|
|
97 (MSWINDOWS_SUBWINDOW_DATA (i)->clip_window)
|
|
98
|
|
99 #define XIMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW(i) \
|
|
100 IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (XIMAGE_INSTANCE (i))
|
|
101
|
267
|
102 #endif /* HAVE_MS_WINDOWS */
|
412
|
103 #endif /* _XEMACS_GLYPHS_MSW_H_ */
|