Mercurial > hg > xemacs-beta
comparison src/glyphs-msw.c @ 863:42375619fa45
[xemacs-hg @ 2002-06-04 06:03:59 by andyp]
merge 21.4 windows changes, minimally tested
author | andyp |
---|---|
date | Tue, 04 Jun 2002 06:05:53 +0000 |
parents | 2b6fa2618f76 |
children | 804517e16990 |
comparison
equal
deleted
inserted
replaced
862:278c743f1578 | 863:42375619fa45 |
---|---|
1952 SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), | 1952 SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), |
1953 NULL, | 1953 NULL, |
1954 0, 0, 0, 0, | 1954 0, 0, 0, 0, |
1955 SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE | 1955 SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE |
1956 | SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOACTIVATE); | 1956 | SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOACTIVATE); |
1957 | |
1958 /* Doing this once does not seem to be enough, for instance when | |
1959 mapping the search dialog this gets called four times. If we | |
1960 only set on the first time through then the subwindow never | |
1961 gets focus as intended. However, doing this everytime doesn't | |
1962 seem so bad, after all we only need to redo this after the | |
1963 focus changes - and if that happens resetting the initial | |
1964 focus doesn't seem so bad. */ | |
1965 if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (p)) | |
1966 SetFocus (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p)); | |
1957 #endif | 1967 #endif |
1958 } | 1968 } |
1959 } | 1969 } |
1960 | 1970 |
1961 /* resize the subwindow instance */ | 1971 /* resize the subwindow instance */ |
2035 GWL_STYLE, style | WS_DISABLED); | 2045 GWL_STYLE, style | WS_DISABLED); |
2036 } | 2046 } |
2037 } | 2047 } |
2038 | 2048 |
2039 #ifdef HAVE_WIDGETS | 2049 #ifdef HAVE_WIDGETS |
2050 | |
2051 /* Account for some of the limitations with widget images. */ | |
2052 static int | |
2053 mswindows_widget_border_width (void) | |
2054 { | |
2055 return DEFAULT_WIDGET_BORDER_WIDTH; | |
2056 } | |
2040 | 2057 |
2041 /* register widgets into our hashtable so that we can cope with the | 2058 /* register widgets into our hashtable so that we can cope with the |
2042 callbacks. The hashtable is weak so deregistration is handled | 2059 callbacks. The hashtable is weak so deregistration is handled |
2043 automatically */ | 2060 automatically */ |
2044 static int | 2061 static int |
2272 qxeSendMessage (wnd, WM_SETFONT, | 2289 qxeSendMessage (wnd, WM_SETFONT, |
2273 (WPARAM) mswindows_widget_hfont | 2290 (WPARAM) mswindows_widget_hfont |
2274 (IMAGE_INSTANCE_WIDGET_FACE (ii), domain, | 2291 (IMAGE_INSTANCE_WIDGET_FACE (ii), domain, |
2275 IMAGE_INSTANCE_WIDGET_TEXT (ii)), | 2292 IMAGE_INSTANCE_WIDGET_TEXT (ii)), |
2276 MAKELPARAM (TRUE, 0)); | 2293 MAKELPARAM (TRUE, 0)); |
2277 #if 0 | |
2278 /* #### doesn't work. need to investigate more closely. */ | |
2279 if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (ii)) | |
2280 SetFocus (wnd); | |
2281 #endif | |
2282 } | 2294 } |
2283 | 2295 |
2284 /* Instantiate a native layout widget. */ | 2296 /* Instantiate a native layout widget. */ |
2285 static void | 2297 static void |
2286 mswindows_native_layout_instantiate (Lisp_Object image_instance, | 2298 mswindows_native_layout_instantiate (Lisp_Object image_instance, |
2761 | 2773 |
2762 /* We now have everything right apart from the height. */ | 2774 /* We now have everything right apart from the height. */ |
2763 default_face_font_info (domain, 0, 0, &height, 0, 0); | 2775 default_face_font_info (domain, 0, 0, &height, 0, 0); |
2764 GET_LIST_LENGTH (items, len); | 2776 GET_LIST_LENGTH (items, len); |
2765 | 2777 |
2766 height = (height + WIDGET_BORDER_HEIGHT * 2 ) * len; | 2778 height = (height + DEFAULT_WIDGET_BORDER_WIDTH * 2 ) * len; |
2767 IMAGE_INSTANCE_HEIGHT (ii) = height; | 2779 IMAGE_INSTANCE_HEIGHT (ii) = height; |
2768 | 2780 |
2769 /* Now create the widget. */ | 2781 /* Now create the widget. */ |
2770 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, | 2782 mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, |
2771 pointer_bg, dest_mask, domain, | 2783 pointer_bg, dest_mask, domain, |
2939 CONSOLE_HAS_METHOD (mswindows, image_instance_hash); | 2951 CONSOLE_HAS_METHOD (mswindows, image_instance_hash); |
2940 CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage); | 2952 CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage); |
2941 CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file); | 2953 CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file); |
2942 #ifdef HAVE_WIDGETS | 2954 #ifdef HAVE_WIDGETS |
2943 CONSOLE_HAS_METHOD (mswindows, widget_query_string_geometry); | 2955 CONSOLE_HAS_METHOD (mswindows, widget_query_string_geometry); |
2956 CONSOLE_HAS_METHOD (mswindows, widget_border_width); | |
2944 #endif | 2957 #endif |
2945 | 2958 |
2946 /* image methods - printer */ | 2959 /* image methods - printer */ |
2947 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_image_instance); | 2960 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_image_instance); |
2948 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_image_instance); | 2961 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_image_instance); |