diff options
| author | Geoff Voelker | 1996-05-03 18:48:05 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1996-05-03 18:48:05 +0000 |
| commit | aba66c88ae39b8599525c2aaaca56e79e2fc0dcd (patch) | |
| tree | 9a161f8ada2797806752c81ca0106b325fea7a7e /src | |
| parent | 52cf03a10fcddb3534cc87aff14932f13f85858b (diff) | |
| download | emacs-aba66c88ae39b8599525c2aaaca56e79e2fc0dcd.tar.gz emacs-aba66c88ae39b8599525c2aaaca56e79e2fc0dcd.zip | |
(struct win32_palette_entry): New structure.
(win32_display_info): New fields has_palette, p_colors_in_use,
n_colors_in_use, h_palette.
(win32_output): New field h_old_palette.
(WM_EMACS_SETWINDOWPOS): New macro.
(WM_EMACS_DESTROY_WINDOW): Value redefined.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.h | 58 |
1 files changed, 51 insertions, 7 deletions
diff --git a/src/w32term.h b/src/w32term.h index 368fc0c5d8e..9dd326ded95 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -75,6 +75,23 @@ struct win32_bitmap_record | |||
| 75 | /* Record some info about this pixmap. */ | 75 | /* Record some info about this pixmap. */ |
| 76 | int height, width, depth; | 76 | int height, width, depth; |
| 77 | }; | 77 | }; |
| 78 | |||
| 79 | /* Palette book-keeping stuff for mapping requested colors into the | ||
| 80 | system palette. Keep a ref-counted list of requested colors and | ||
| 81 | regenerate the app palette whenever the requested list changes. */ | ||
| 82 | |||
| 83 | extern Lisp_Object Vwin32_enable_palette; | ||
| 84 | |||
| 85 | struct win32_palette_entry { | ||
| 86 | struct win32_palette_entry * next; | ||
| 87 | PALETTEENTRY entry; | ||
| 88 | #if 0 | ||
| 89 | unsigned refcount; | ||
| 90 | #endif | ||
| 91 | }; | ||
| 92 | |||
| 93 | extern void win32_regenerate_palette(struct frame *f); | ||
| 94 | |||
| 78 | 95 | ||
| 79 | /* For each display (currently only one on win32), we have a structure that | 96 | /* For each display (currently only one on win32), we have a structure that |
| 80 | records information about it. */ | 97 | records information about it. */ |
| @@ -102,6 +119,15 @@ struct win32_display_info | |||
| 102 | /* The cursor to use for vertical scroll bars. */ | 119 | /* The cursor to use for vertical scroll bars. */ |
| 103 | Cursor vertical_scroll_bar_cursor; | 120 | Cursor vertical_scroll_bar_cursor; |
| 104 | 121 | ||
| 122 | /* color palette information */ | ||
| 123 | int has_palette; | ||
| 124 | struct win32_palette_entry * color_list; | ||
| 125 | unsigned num_colors; | ||
| 126 | HPALETTE palette; | ||
| 127 | |||
| 128 | /* deferred action flags checked when starting frame update */ | ||
| 129 | int regen_palette; | ||
| 130 | |||
| 105 | /* A table of all the fonts we have already loaded. */ | 131 | /* A table of all the fonts we have already loaded. */ |
| 106 | struct font_info *font_table; | 132 | struct font_info *font_table; |
| 107 | 133 | ||
| @@ -187,6 +213,9 @@ extern struct win32_display_info *win32_term_init (); | |||
| 187 | 213 | ||
| 188 | struct win32_output | 214 | struct win32_output |
| 189 | { | 215 | { |
| 216 | /* Original palette (used to deselect real palette after drawing) */ | ||
| 217 | HPALETTE old_palette; | ||
| 218 | |||
| 190 | /* Position of the Win32 window (x and y offsets in root window). */ | 219 | /* Position of the Win32 window (x and y offsets in root window). */ |
| 191 | int left_pos; | 220 | int left_pos; |
| 192 | int top_pos; | 221 | int top_pos; |
| @@ -548,18 +577,25 @@ win32_fill_area (f,hdc,f->output_data.win32->background_pixel,x,y,nx,ny) | |||
| 548 | extern XFontStruct *win32_load_font (); | 577 | extern XFontStruct *win32_load_font (); |
| 549 | extern void win32_unload_font (); | 578 | extern void win32_unload_font (); |
| 550 | 579 | ||
| 551 | extern HDC map_mode(); | ||
| 552 | |||
| 553 | #define my_get_dc(hwnd) (map_mode (GetDC (hwnd))) | ||
| 554 | |||
| 555 | #define WM_EMACS_START (WM_USER + 1) | 580 | #define WM_EMACS_START (WM_USER + 1) |
| 556 | #define WM_EMACS_KILL (WM_EMACS_START + 0x00) | 581 | #define WM_EMACS_KILL (WM_EMACS_START + 0x00) |
| 557 | #define WM_EMACS_CREATEWINDOW (WM_EMACS_START + 0x01) | 582 | #define WM_EMACS_CREATEWINDOW (WM_EMACS_START + 0x01) |
| 558 | #define WM_EMACS_DONE (WM_EMACS_START + 0x02) | 583 | #define WM_EMACS_DONE (WM_EMACS_START + 0x02) |
| 559 | #define WM_EMACS_CREATESCROLLBAR (WM_EMACS_START + 0x03) | 584 | #define WM_EMACS_CREATESCROLLBAR (WM_EMACS_START + 0x03) |
| 560 | #define WM_EMACS_DESTROYWINDOW (WM_EMACS_START + 0x04) | 585 | #define WM_EMACS_SHOWWINDOW (WM_EMACS_START + 0x04) |
| 586 | #define WM_EMACS_SETWINDOWPOS (WM_EMACS_START + 0x05) | ||
| 587 | #define WM_EMACS_DESTROYWINDOW (WM_EMACS_START + 0x06) | ||
| 561 | #define WM_EMACS_END (WM_EMACS_START + 0x10) | 588 | #define WM_EMACS_END (WM_EMACS_START + 0x10) |
| 562 | 589 | ||
| 590 | typedef struct { | ||
| 591 | HWND hwndAfter; | ||
| 592 | int x; | ||
| 593 | int y; | ||
| 594 | int cx; | ||
| 595 | int cy; | ||
| 596 | int flags; | ||
| 597 | } Win32WindowPos; | ||
| 598 | |||
| 563 | #define WND_X_UNITS_INDEX (0) | 599 | #define WND_X_UNITS_INDEX (0) |
| 564 | #define WND_Y_UNITS_INDEX (4) | 600 | #define WND_Y_UNITS_INDEX (4) |
| 565 | #define WND_BACKGROUND_INDEX (8) | 601 | #define WND_BACKGROUND_INDEX (8) |
| @@ -578,11 +614,19 @@ typedef struct Win32Msg { | |||
| 578 | RECT rect; | 614 | RECT rect; |
| 579 | } Win32Msg; | 615 | } Win32Msg; |
| 580 | 616 | ||
| 617 | extern CRITICAL_SECTION critsect; | ||
| 618 | |||
| 581 | extern void init_crit (); | 619 | extern void init_crit (); |
| 582 | extern void enter_crit (); | ||
| 583 | extern void leave_crit (); | ||
| 584 | extern void delete_crit (); | 620 | extern void delete_crit (); |
| 585 | 621 | ||
| 622 | #define enter_crit() EnterCriticalSection (&critsect) | ||
| 623 | #define leave_crit() LeaveCriticalSection (&critsect) | ||
| 624 | |||
| 625 | extern void select_palette (struct frame * f, HDC hdc); | ||
| 626 | extern void deselect_palette (struct frame * f, HDC hdc); | ||
| 627 | extern HDC get_frame_dc (struct frame * f); | ||
| 628 | extern int release_frame_dc (struct frame * f, HDC hDC); | ||
| 629 | |||
| 586 | extern BOOL get_next_msg (); | 630 | extern BOOL get_next_msg (); |
| 587 | extern BOOL post_msg (); | 631 | extern BOOL post_msg (); |
| 588 | extern void wait_for_sync (); | 632 | extern void wait_for_sync (); |