Changeset 3906
- Timestamp:
- 10/13/05 21:40:58 (3 years ago)
- Files:
-
- trunk/src/ChangeLog.Meadow (modified) (2 diffs)
- trunk/src/mw32fns.c (modified) (6 diffs)
- trunk/src/mw32term.c (modified) (4 diffs)
- trunk/src/mw32term.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/ChangeLog.Meadow
r3905 r3906 3 3 * mw32term.h (mw32_alpha_type): New enumeration. 4 4 (struct mw32_output): Remove *_alpha except current_alpha, and add 5 alpha[]. 5 alpha[]. Add new member current_cursor; 6 6 7 7 * mw32term.c (mw32_update_frame_alpha): Refine code and sadd 8 8 upport of alpha of resizing window. 9 (show_or_hide_mouse_cursor): Set mouse cursor. 10 (show_or_hide_mouse_cursor<WM_MOUSELEAVE>): Restore mouse cursor 11 when leaving. 12 (mw32_define_frame_cursor): Set current cursor. 13 (mw32_term_init): Initialize mouse cursor image. 9 14 10 15 * mw32fns.c (CHECK_ALPHA_RANGE): New macro. 11 16 (mw32_set_frame_alpha): Refine code and sadd upport of alpha of 12 resizing window. 17 resizing window. Remove excessive whitespaces. 13 18 (mw32_WndProc<WM_SETFOCUS>): Immediately udpate alpha. 14 19 (mw32_WndProc<WM_KILLFOCUS>): Immediately udpate alpha. … … 16 21 (mw32_WndProc<WM_SIZING>): New event handler. 17 22 (mw32_WndProc<WM_EXITSIZEMOVE>): Ditto. 18 (x-create-frame): Following changes of mw32_output. 19 23 (x-create-frame): Following changes of mw32_output. Initialize 24 mouse cursor images. 25 (mw32_load_cursor): New function copied from w32fns.c. 26 20 27 2005-10-12 Masayuki FUJII <boochang@m4.kcn.ne.jp> 21 28 trunk/src/mw32fns.c
r3905 r3906 778 778 } 779 779 780 Cursor 781 mw32_load_cursor (LPCTSTR name) 782 { 783 /* Try first to load cursor from application resource. */ 784 Cursor cursor = LoadImage ((HINSTANCE) GetModuleHandle(NULL), 785 name, IMAGE_CURSOR, 0, 0, 786 LR_DEFAULTCOLOR | LR_DEFAULTSIZE | LR_SHARED); 787 if (!cursor) 788 { 789 /* Then try to load a shared predefined cursor. */ 790 cursor = LoadImage (NULL, name, IMAGE_CURSOR, 0, 0, 791 LR_DEFAULTCOLOR | LR_DEFAULTSIZE | LR_SHARED); 792 } 793 return cursor; 794 } 795 780 796 static void 781 797 mw32_set_cursor_color (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) … … 941 957 int i, tmp; 942 958 Lisp_Object obj; 943 959 944 960 if (SetLayeredWindowAttributes == NULL) 945 961 return; 946 962 947 963 for (i = 0 ; i < NUM_OF_ALPHAS ; i++) 948 964 newalpha[i] = -1; 949 965 950 966 if (!NILP (arg)) 951 967 { … … 963 979 for (i = 0 ; i < NUM_OF_ALPHAS ; i++) 964 980 newalpha[i] = tmp; 965 981 966 982 if (NUMBERP (CDR (arg))) 967 983 { … … 970 986 newalpha[ALPHA_INACTIVE] = tmp; 971 987 } 972 988 973 989 obj = CDR (arg); 974 990 for (i = ALPHA_INACTIVE ; … … 995 1011 f->output_data.mw32->alpha[i] = newalpha[i]; 996 1012 } 997 1013 998 1014 mw32_update_frame_alpha (f, TRUE); 999 1015 } … … 2831 2847 #endif 2832 2848 2849 f->output_data.mw32->text_cursor 2850 = mw32_load_cursor (IDC_IBEAM); 2851 f->output_data.mw32->nontext_cursor 2852 = mw32_load_cursor (IDC_ARROW); 2853 f->output_data.mw32->modeline_cursor 2854 = mw32_load_cursor (IDC_SIZENS); 2855 f->output_data.mw32->hand_cursor 2856 = mw32_load_cursor (IDC_HAND); 2857 f->output_data.mw32->hourglass_cursor 2858 = mw32_load_cursor (IDC_WAIT); 2859 f->output_data.mw32->horizontal_drag_cursor 2860 = mw32_load_cursor (IDC_SIZEWE); 2861 2862 f->output_data.mw32->current_cursor 2863 = f->output_data.mw32->nontext_cursor; 2864 2833 2865 #if 0 2834 2866 /* These colors will be set anyway later, but it's important trunk/src/mw32term.c
r3905 r3906 4190 4190 { 4191 4191 static unsigned int mouse_hide_timer = 0; 4192 SetCursor (FRAME_MW32_OUTPUT (XFRAME (selected_frame))->current_cursor); 4192 4193 4193 4194 if (mw32_inhibit_hide_mouse) … … 4277 4278 } 4278 4279 dpyinfo->mouse_face_hidden = 0; 4280 4281 FRAME_MW32_OUTPUT (XFRAME (selected_frame))->current_cursor 4282 = FRAME_MW32_OUTPUT (XFRAME (selected_frame))->nontext_cursor; 4283 SetCursor (FRAME_MW32_OUTPUT (XFRAME (selected_frame))->current_cursor); 4279 4284 4280 4285 break; … … 5172 5177 mw32_define_frame_cursor (struct frame *f, Cursor cursor) 5173 5178 { 5174 #if 0 /* TODO */ 5175 mw32_define_cursor (FRAME_W32_WINDOW (f), cursor); 5176 #endif 5179 FRAME_MW32_OUTPUT (f)->current_cursor = cursor; 5177 5180 } 5178 5181 … … 6002 6005 dpyinfo->image_cache = make_image_cache (); 6003 6006 6004 dpyinfo->vertical_scroll_bar_cursor = 0;6007 dpyinfo->vertical_scroll_bar_cursor = mw32_load_cursor (IDC_SIZENS); 6005 6008 6006 6009 #if 0 trunk/src/mw32term.h
r3905 r3906 493 493 int alpha[NUM_OF_ALPHAS]; 494 494 int current_alpha; /* Current alpha value of this frame */ 495 496 Cursor current_cursor; 495 497 }; 496 498
