Mercurial > hg > xemacs-beta
comparison src/glyphs-msw.c @ 502:7039e6323819
[xemacs-hg @ 2001-05-04 22:41:46 by ben]
----------------------- byte-comp warning fixes -----------------
New functions for cleanly eliminating byte-compiler warnings.
Their definitions require no changes at all in bytecomp.el,
meaning that any package that wants to use them and be compatible
with older versions of XEmacs need only copy the code and rename
the functions (i.e. prefix them with the package name).
Eliminate byte-compiler warnings using the new functions in
bytecomp-runtime.el.
Move coding-system-put,get,category, since they're not
Mule-specific and are used in prefer-coding-system.
font.el was incredibly ugly. Clean it up. Avoid using defsubst
for any exported functions, to avoid possible compatibility
problems if we later change the internal interface. (It happened
before, with face accessors, between 19.8 and 19.9). Fix tons
of warnings.
Clean up (new function gpm-is-supported-p eliminates duplicate
code in gpm-create/delete-device-hook) and eliminate warnings.
---------- make byte-recompile-directory work in the ---------
core `lisp' dir, even in the absence of
a Mule XEmacs (i.e. make it skip the Mule
files rather than trying to compile them).
now you should be able to do `touch *.el'
in the `lisp' dir, then
M-x byte-recompile-directory, and get no
warnings.
Avoid trying to compile Mule files in byte-recompile-directory
when we're not in a Mule XEmacs, since we're highly likely to get
syntax errors.
Add a coding-system cookie to all Mule files so that
byte-recompile-directory ignores them.
Magic cookie function moved to files.el from code-files.el (for
use by bytecomp even in a non-coding-system XEmacs), and changed
names and semantics for use by bytecomp. NOTE: IMO this is an
internal function that we can change as we like (and there is
absolutely no code anywhere else using the function).
---------------- GUI improvements: menus, help -------------------
Rearrange order of keymap declarations to be alphabetical.
Improve help on help to include all bindings, and group by
category. Add bindings for new Info commands. Remove
warnings. Use command-hyper-apropos in place of command-apropos.
Add a function to do the equivalent of command-apropos.
Evals its help-text argument so you can put expressions there.
Used now by help-for-help.
Add binding to continue text searches. Expand index searches to
work over multiple info documents. Add commands to search
text/index in User and Lispref.
Add new entry, "Uncomment Region" (parallels "Comment Out Region").
Redo Help menu; add bindings for new Info commands to search the
index or text of the User and Lispref manuals. Add command for
mark-paragraph, activate-region. Make Edit->R accelerator be
rectangle, not register (more commonly used), and put rectangle
first. Fix the Edit Init File entry to never load the .elc file.
Simplify the default-popup-menu. Add Cmds->Tabs menu.
Use kp-left not kp_left, etc.
---------------- Miscellaneous bug fixes/cleanup -------------------
byte-compiler-options: Correct doc string.
easy-menu-do-define: fix extra quote.
fill-paragraph-or-region:Rewrite to be more correct -- use
call-interactively so that we always get exactly the same
behavior as if the functions were called directly.
No need to fiddle with zmacs-region-stays, now that bogus
clearing of it (2001-04-28 src/ChangeLog) is removed.
Put dialog titles back in -- this time correctly. Fix various
other problems with leaks and such.
key-sequence-list-description:
Clean up fun to always correctly canonicalize.
Clean up Kinsoku comments, synch comment-region with FSF 20.7.
* simple.el (region-exists-p):
* simple.el (region-active-p):
Add comment about which one is correct to use in menu specs.
* sound.el (load-sound-file):
Minor code clean up.
* startup.el:
* startup.el (command-line-early):
* startup.el (initial-scratch-message):
Comment changes. Add info about sample.init.el to splash screen.
Improve initial-scratch-message and clarify purpose of Scratch
buffer. Fix byte-compile warning.
------------------------ Added features -------------------------
Add new variable to control whether etags checks all parent
directories for tag files. (On by default.)
* hash-table.el: New file, useful utility functions.
* dumped-lisp.el (preloaded-file-list): Dump hash-table.el.
------------ notable bug fix: Windows event code --------------
Get critical quit working.
------------ notable bug fix and new feature: regex code --------------
Shy groups were implemented in a horrible, half-assed way that
would cause them to screw up regex searching in most cases.
Fixed to work correctly.
Also extended back-reference syntax past 9. Only is recognized
as such if there are at least that many non-shy groups; and
optionally will warn about such uses, to catch old code that
might be using them differently. (Added variable to control
this in search.c -- `warn-about-possibly-incompatible-back-
references', on by default for the moment. Declared in lisp.h.
---------------- process/SIGIO improvements -------------------
define USE_GETADDRINFO to replace more complex conditional,
and use it. the code conditionalized on this in
unix_open_network_stream had *serious* problems handling errors.
it's now fixed, and major amounts of duplicate code between
the two versions were combined.
don't disable SIGIO and other interrupts unless
CONNECT_NEEDS_SLOWED_INTERRUPTS is defined -- don't penalize OS's
without bugs. similarly for a freebsd bug that was affecting all
OS's.
* s\ultrix.h:
define CONNECT_NEEDS_SLOWED_INTERRUPTS, since that's the OS
mentioned as having a kernel bug.
* sysdep.c (request_sigio_on_device):
* sysdep.c (unrequest_sigio_on_device):
fix SIGIO problems on Linux. add check for O_ASYNC in case it's
defined and FASYNC isn't. add comment about other ways to do
SIGIO on Linux.
* callproc.c (Fold_call_process_internal):
* process.c (Fstart_process_internal):
Deal with the possibility that `default-directory' doesn't
have terminating slash. Correct comments about vfork.
---------------- Miscellaneous bug fixes/cleanup -------------------
* callint.c (Finteractive):
Add lots of documentation -- exactly what the Lisp equivalents of
all the interactive specs are.
* console.h (struct console): change type of quit_char to Emchar.
* event-msw.c (lstream_type_create_mswindows_selectable): spacing
change.
Eliminate events-mod.h and combine into events.h.
* emacs.c:
* emacs.c (make_arg_list_1):
* emacs.c (main_1):
A couple of char->Extbyte changes, add a comment.
* glyphs-msw.c:
Correct indentation of function defns to not exceed 80 cols.
Try (sort of) to fix some code that sets the colors of the
progress gauge. (Commented out)
* keymap.c (syms_of_keymap):
use DEFSYMBOL.
* process.c (read_process_output):
No need to fiddle with zmacs_region_stays, now that bogus
clearing of it (see below) is removed.
* search.c (Freplace_match): warning fix.
author | ben |
---|---|
date | Fri, 04 May 2001 22:42:35 +0000 |
parents | d7a9135ec789 |
children | ed498ef2108b |
comparison
equal
deleted
inserted
replaced
501:0a255b32b157 | 502:7039e6323819 |
---|---|
1248 else | 1248 else |
1249 return 0; | 1249 return 0; |
1250 } | 1250 } |
1251 | 1251 |
1252 static void | 1252 static void |
1253 mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 1253 mswindows_resource_instantiate (Lisp_Object image_instance, |
1254 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 1254 Lisp_Object instantiator, |
1255 int dest_mask, Lisp_Object domain) | 1255 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
1256 int dest_mask, Lisp_Object domain) | |
1256 { | 1257 { |
1257 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 1258 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
1258 unsigned int type = 0; | 1259 unsigned int type = 0; |
1259 HANDLE himage = NULL; | 1260 HANDLE himage = NULL; |
1260 LPCTSTR resid=0; | 1261 LPCTSTR resid=0; |
1986 definition in compface.h */ | 1987 definition in compface.h */ |
1987 extern jmp_buf comp_env; | 1988 extern jmp_buf comp_env; |
1988 #undef SYSV32 | 1989 #undef SYSV32 |
1989 | 1990 |
1990 static void | 1991 static void |
1991 mswindows_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 1992 mswindows_xface_instantiate (Lisp_Object image_instance, |
1993 Lisp_Object instantiator, | |
1992 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 1994 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
1993 int dest_mask, Lisp_Object domain) | 1995 int dest_mask, Lisp_Object domain) |
1994 { | 1996 { |
1995 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); | 1997 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); |
1996 int i, stattis; | 1998 int i, stattis; |
2374 XIMAGE_INSTANCE_WIDGET_ITEM (instance), | 2376 XIMAGE_INSTANCE_WIDGET_ITEM (instance), |
2375 domain); | 2377 domain); |
2376 } | 2378 } |
2377 | 2379 |
2378 static void | 2380 static void |
2379 mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2381 mswindows_subwindow_instantiate (Lisp_Object image_instance, |
2380 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2382 Lisp_Object instantiator, |
2383 Lisp_Object pointer_fg, | |
2384 Lisp_Object pointer_bg, | |
2381 int dest_mask, Lisp_Object domain) | 2385 int dest_mask, Lisp_Object domain) |
2382 { | 2386 { |
2383 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2387 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2384 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 2388 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
2385 Lisp_Object frame = DOMAIN_FRAME (domain); | 2389 Lisp_Object frame = DOMAIN_FRAME (domain); |
2494 | 2498 |
2495 /************************************************************************/ | 2499 /************************************************************************/ |
2496 /* widgets */ | 2500 /* widgets */ |
2497 /************************************************************************/ | 2501 /************************************************************************/ |
2498 static void | 2502 static void |
2499 mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2503 mswindows_widget_instantiate (Lisp_Object image_instance, |
2504 Lisp_Object instantiator, | |
2500 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2505 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
2501 int dest_mask, Lisp_Object domain, | 2506 int dest_mask, Lisp_Object domain, |
2502 const char* class, int flags, int exflags) | 2507 const char* class, int flags, int exflags) |
2503 { | 2508 { |
2504 /* this function can call lisp */ | 2509 /* this function can call lisp */ |
2585 | 2590 |
2586 /* Instantiate a native layout widget. */ | 2591 /* Instantiate a native layout widget. */ |
2587 static void | 2592 static void |
2588 mswindows_native_layout_instantiate (Lisp_Object image_instance, | 2593 mswindows_native_layout_instantiate (Lisp_Object image_instance, |
2589 Lisp_Object instantiator, | 2594 Lisp_Object instantiator, |
2590 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2595 Lisp_Object pointer_fg, |
2596 Lisp_Object pointer_bg, | |
2591 int dest_mask, Lisp_Object domain) | 2597 int dest_mask, Lisp_Object domain) |
2592 { | 2598 { |
2593 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2599 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2594 | 2600 |
2595 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, | 2601 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, |
2610 like images where you just select the image into the context you | 2616 like images where you just select the image into the context you |
2611 want to display it in and BitBlt it. So image instances can have a | 2617 want to display it in and BitBlt it. So image instances can have a |
2612 many-to-one relationship with things you see, whereas widgets can | 2618 many-to-one relationship with things you see, whereas widgets can |
2613 only be one-to-one (i.e. per frame) */ | 2619 only be one-to-one (i.e. per frame) */ |
2614 static void | 2620 static void |
2615 mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2621 mswindows_button_instantiate (Lisp_Object image_instance, |
2622 Lisp_Object instantiator, | |
2616 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2623 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
2617 int dest_mask, Lisp_Object domain) | 2624 int dest_mask, Lisp_Object domain) |
2618 { | 2625 { |
2619 /* This function can call lisp */ | 2626 /* This function can call lisp */ |
2620 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2627 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2695 BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); | 2702 BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); |
2696 } | 2703 } |
2697 | 2704 |
2698 /* instantiate an edit control */ | 2705 /* instantiate an edit control */ |
2699 static void | 2706 static void |
2700 mswindows_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2707 mswindows_edit_field_instantiate (Lisp_Object image_instance, |
2701 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2708 Lisp_Object instantiator, |
2702 int dest_mask, Lisp_Object domain) | 2709 Lisp_Object pointer_fg, |
2710 Lisp_Object pointer_bg, | |
2711 int dest_mask, Lisp_Object domain) | |
2703 { | 2712 { |
2704 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, | 2713 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, |
2705 pointer_bg, dest_mask, domain, "EDIT", | 2714 pointer_bg, dest_mask, domain, "EDIT", |
2706 ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP | 2715 ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP |
2707 | WS_BORDER, WS_EX_CLIENTEDGE); | 2716 | WS_BORDER, WS_EX_CLIENTEDGE); |
2708 } | 2717 } |
2709 | 2718 |
2710 /* instantiate a progress gauge */ | 2719 /* instantiate a progress gauge */ |
2711 static void | 2720 static void |
2712 mswindows_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2721 mswindows_progress_gauge_instantiate (Lisp_Object image_instance, |
2713 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2722 Lisp_Object instantiator, |
2714 int dest_mask, Lisp_Object domain) | 2723 Lisp_Object pointer_fg, |
2724 Lisp_Object pointer_bg, | |
2725 int dest_mask, Lisp_Object domain) | |
2715 { | 2726 { |
2716 HWND wnd; | 2727 HWND wnd; |
2717 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2728 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2718 Lisp_Object val; | 2729 Lisp_Object val; |
2719 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, | 2730 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, |
2720 pointer_bg, dest_mask, domain, PROGRESS_CLASS, | 2731 pointer_bg, dest_mask, domain, PROGRESS_CLASS, |
2721 WS_BORDER | PBS_SMOOTH, WS_EX_CLIENTEDGE); | 2732 WS_BORDER | PBS_SMOOTH, WS_EX_CLIENTEDGE); |
2722 wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); | 2733 wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); |
2723 /* set the colors */ | 2734 /* set the colors */ |
2724 #ifdef PBS_SETBKCOLOR | 2735 #if 0 /* #### fix this */ |
2725 SendMessage (wnd, PBS_SETBKCOLOR, 0, | 2736 SendMessage (wnd, PBM_SETBKCOLOR, 0, |
2726 (LPARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR | 2737 (LPARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR |
2727 (XCOLOR_INSTANCE | 2738 (XCOLOR_INSTANCE |
2728 (FACE_BACKGROUND | 2739 (FACE_BACKGROUND |
2729 (XIMAGE_INSTANCE_WIDGET_FACE (ii), | 2740 (XIMAGE_INSTANCE_WIDGET_FACE (ii), |
2730 XIMAGE_INSTANCE_FRAME (ii)))))); | 2741 XIMAGE_INSTANCE_FRAME (ii)))))); |
2731 #endif | 2742 SendMessage (wnd, PBM_SETBARCOLOR, 0, |
2732 #ifdef PBS_SETBARCOLOR | 2743 (LPARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR |
2733 SendMessage (wnd, PBS_SETBARCOLOR, 0, | |
2734 (L:PARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR | |
2735 (XCOLOR_INSTANCE | 2744 (XCOLOR_INSTANCE |
2736 (FACE_FOREGROUND | 2745 (FACE_FOREGROUND |
2737 (XIMAGE_INSTANCE_WIDGET_FACE (ii), | 2746 (XIMAGE_INSTANCE_WIDGET_FACE (ii), |
2738 XIMAGE_INSTANCE_FRAME (ii)))))); | 2747 XIMAGE_INSTANCE_FRAME (ii)))))); |
2739 #endif | 2748 #endif |
2796 add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain); | 2805 add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain); |
2797 } | 2806 } |
2798 } | 2807 } |
2799 | 2808 |
2800 static void | 2809 static void |
2801 mswindows_tree_view_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2810 mswindows_tree_view_instantiate (Lisp_Object image_instance, |
2802 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2811 Lisp_Object instantiator, |
2803 int dest_mask, Lisp_Object domain) | 2812 Lisp_Object pointer_fg, |
2813 Lisp_Object pointer_bg, | |
2814 int dest_mask, Lisp_Object domain) | |
2804 { | 2815 { |
2805 Lisp_Object rest; | 2816 Lisp_Object rest; |
2806 HWND wnd; | 2817 HWND wnd; |
2807 HTREEITEM parent; | 2818 HTREEITEM parent; |
2808 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2819 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2899 | 2910 |
2900 return ret; | 2911 return ret; |
2901 } | 2912 } |
2902 | 2913 |
2903 static void | 2914 static void |
2904 mswindows_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2915 mswindows_tab_control_instantiate (Lisp_Object image_instance, |
2905 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2916 Lisp_Object instantiator, |
2906 int dest_mask, Lisp_Object domain) | 2917 Lisp_Object pointer_fg, |
2918 Lisp_Object pointer_bg, | |
2919 int dest_mask, Lisp_Object domain) | |
2907 { | 2920 { |
2908 /* This function can call lisp */ | 2921 /* This function can call lisp */ |
2909 Lisp_Object rest; | 2922 Lisp_Object rest; |
2910 HWND wnd; | 2923 HWND wnd; |
2911 int i = 0, selected = 0; | 2924 int i = 0, selected = 0; |
3014 } | 3027 } |
3015 } | 3028 } |
3016 | 3029 |
3017 /* instantiate a static control possible for putting other things in */ | 3030 /* instantiate a static control possible for putting other things in */ |
3018 static void | 3031 static void |
3019 mswindows_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 3032 mswindows_label_instantiate (Lisp_Object image_instance, |
3033 Lisp_Object instantiator, | |
3020 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 3034 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
3021 int dest_mask, Lisp_Object domain) | 3035 int dest_mask, Lisp_Object domain) |
3022 { | 3036 { |
3023 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, | 3037 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, |
3024 pointer_bg, dest_mask, domain, "STATIC", | 3038 pointer_bg, dest_mask, domain, "STATIC", |
3025 0, WS_EX_STATICEDGE); | 3039 0, WS_EX_STATICEDGE); |
3026 } | 3040 } |
3027 | 3041 |
3028 /* instantiate a scrollbar control */ | 3042 /* instantiate a scrollbar control */ |
3029 static void | 3043 static void |
3030 mswindows_scrollbar_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 3044 mswindows_scrollbar_instantiate (Lisp_Object image_instance, |
3031 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 3045 Lisp_Object instantiator, |
3046 Lisp_Object pointer_fg, | |
3047 Lisp_Object pointer_bg, | |
3032 int dest_mask, Lisp_Object domain) | 3048 int dest_mask, Lisp_Object domain) |
3033 { | 3049 { |
3034 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, | 3050 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, |
3035 pointer_bg, dest_mask, domain, "SCROLLBAR", | 3051 pointer_bg, dest_mask, domain, "SCROLLBAR", |
3036 WS_TABSTOP, WS_EX_CLIENTEDGE); | 3052 WS_TABSTOP, WS_EX_CLIENTEDGE); |
3037 } | 3053 } |
3038 | 3054 |
3039 /* instantiate a combo control */ | 3055 /* instantiate a combo control */ |
3040 static void | 3056 static void |
3041 mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 3057 mswindows_combo_box_instantiate (Lisp_Object image_instance, |
3042 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 3058 Lisp_Object instantiator, |
3043 int dest_mask, Lisp_Object domain) | 3059 Lisp_Object pointer_fg, |
3060 Lisp_Object pointer_bg, | |
3061 int dest_mask, Lisp_Object domain) | |
3044 { | 3062 { |
3045 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 3063 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
3046 HWND wnd; | 3064 HWND wnd; |
3047 Lisp_Object rest; | 3065 Lisp_Object rest; |
3048 Lisp_Object items = find_keyword_in_vector (instantiator, Q_items); | 3066 Lisp_Object items = find_keyword_in_vector (instantiator, Q_items); |