comparison src/gui_w32.c @ 7823:bcef391c101c v7.4.1208

commit https://github.com/vim/vim/commit/68c2f638e65d914dc6e84eb7ce2624f08af525c0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 30 17:24:07 2016 +0100 patch 7.4.1208 Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Jan 2016 17:30:04 +0100
parents 1a5d34492798
children 226ed297307f
comparison
equal deleted inserted replaced
7822:c357d21dc1b5 7823:bcef391c101c
2244 2244
2245 /* 2245 /*
2246 * Get IM status. When IM is on, return not 0. Else return 0. 2246 * Get IM status. When IM is on, return not 0. Else return 0.
2247 */ 2247 */
2248 int 2248 int
2249 im_get_status() 2249 im_get_status(void)
2250 { 2250 {
2251 int status = 0; 2251 int status = 0;
2252 HIMC hImc; 2252 HIMC hImc;
2253 2253
2254 if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0) 2254 if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0)
4523 HANDLE hShape; /* Mask bitmap handle */ 4523 HANDLE hShape; /* Mask bitmap handle */
4524 #endif 4524 #endif
4525 } signicon_t; 4525 } signicon_t;
4526 4526
4527 void 4527 void
4528 gui_mch_drawsign(row, col, typenr) 4528 gui_mch_drawsign(int row, int col, int typenr)
4529 int row;
4530 int col;
4531 int typenr;
4532 { 4529 {
4533 signicon_t *sign; 4530 signicon_t *sign;
4534 int x, y, w, h; 4531 int x, y, w, h;
4535 4532
4536 if (!gui.in_use || (sign = (signicon_t *)sign_get_image(typenr)) == NULL) 4533 if (!gui.in_use || (sign = (signicon_t *)sign_get_image(typenr)) == NULL)
4603 #endif 4600 #endif
4604 } 4601 }
4605 } 4602 }
4606 4603
4607 void * 4604 void *
4608 gui_mch_register_sign(signfile) 4605 gui_mch_register_sign(char_u *signfile)
4609 char_u *signfile;
4610 { 4606 {
4611 signicon_t sign, *psign; 4607 signicon_t sign, *psign;
4612 char_u *ext; 4608 char_u *ext;
4613 4609
4614 if (is_winnt_3()) 4610 if (is_winnt_3())
4659 return (void *)psign; 4655 return (void *)psign;
4660 4656
4661 } 4657 }
4662 4658
4663 void 4659 void
4664 gui_mch_destroy_sign(sign) 4660 gui_mch_destroy_sign(void *sign)
4665 void *sign;
4666 { 4661 {
4667 if (sign) 4662 if (sign)
4668 { 4663 {
4669 close_signicon_image((signicon_t *)sign); 4664 close_signicon_image((signicon_t *)sign);
4670 vim_free(sign); 4665 vim_free(sign);
4764 multiline_tip = FALSE; 4759 multiline_tip = FALSE;
4765 return multiline_tip; 4760 return multiline_tip;
4766 } 4761 }
4767 4762
4768 static void 4763 static void
4769 make_tooltip(beval, text, pt) 4764 make_tooltip(BalloonEval *beval, char *text, POINT pt)
4770 BalloonEval *beval;
4771 char *text;
4772 POINT pt;
4773 { 4765 {
4774 TOOLINFO *pti; 4766 TOOLINFO *pti;
4775 int ToolInfoSize; 4767 int ToolInfoSize;
4776 4768
4777 if (multiline_balloon_available() == TRUE) 4769 if (multiline_balloon_available() == TRUE)
4831 mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0); 4823 mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0);
4832 vim_free(pti); 4824 vim_free(pti);
4833 } 4825 }
4834 4826
4835 static void 4827 static void
4836 delete_tooltip(beval) 4828 delete_tooltip(BalloonEval *beval)
4837 BalloonEval *beval;
4838 { 4829 {
4839 PostMessage(beval->balloon, WM_CLOSE, 0, 0); 4830 PostMessage(beval->balloon, WM_CLOSE, 0, 0);
4840 } 4831 }
4841 4832
4842 /*ARGSUSED*/ 4833 /*ARGSUSED*/
4843 static VOID CALLBACK 4834 static VOID CALLBACK
4844 BevalTimerProc(hwnd, uMsg, idEvent, dwTime) 4835 BevalTimerProc(
4845 HWND hwnd; 4836 HWND hwnd,
4846 UINT uMsg; 4837 UINT uMsg,
4847 UINT_PTR idEvent; 4838 UINT_PTR idEvent,
4848 DWORD dwTime; 4839 DWORD dwTime)
4849 { 4840 {
4850 POINT pt; 4841 POINT pt;
4851 RECT rect; 4842 RECT rect;
4852 4843
4853 if (cur_beval == NULL || cur_beval->showState == ShS_SHOWING || !p_beval) 4844 if (cur_beval == NULL || cur_beval->showState == ShS_SHOWING || !p_beval)
4881 } 4872 }
4882 } 4873 }
4883 4874
4884 /*ARGSUSED*/ 4875 /*ARGSUSED*/
4885 void 4876 void
4886 gui_mch_disable_beval_area(beval) 4877 gui_mch_disable_beval_area(BalloonEval *beval)
4887 BalloonEval *beval;
4888 { 4878 {
4889 // TRACE0("gui_mch_disable_beval_area {{{"); 4879 // TRACE0("gui_mch_disable_beval_area {{{");
4890 KillTimer(s_textArea, BevalTimerId); 4880 KillTimer(s_textArea, BevalTimerId);
4891 // TRACE0("gui_mch_disable_beval_area }}}"); 4881 // TRACE0("gui_mch_disable_beval_area }}}");
4892 } 4882 }
4893 4883
4894 /*ARGSUSED*/ 4884 /*ARGSUSED*/
4895 void 4885 void
4896 gui_mch_enable_beval_area(beval) 4886 gui_mch_enable_beval_area(BalloonEval *beval)
4897 BalloonEval *beval;
4898 { 4887 {
4899 // TRACE0("gui_mch_enable_beval_area |||"); 4888 // TRACE0("gui_mch_enable_beval_area |||");
4900 if (beval == NULL) 4889 if (beval == NULL)
4901 return; 4890 return;
4902 // TRACE0("gui_mch_enable_beval_area {{{"); 4891 // TRACE0("gui_mch_enable_beval_area {{{");
4903 BevalTimerId = SetTimer(s_textArea, 0, (UINT)(p_bdlay / 2), BevalTimerProc); 4892 BevalTimerId = SetTimer(s_textArea, 0, (UINT)(p_bdlay / 2), BevalTimerProc);
4904 // TRACE0("gui_mch_enable_beval_area }}}"); 4893 // TRACE0("gui_mch_enable_beval_area }}}");
4905 } 4894 }
4906 4895
4907 void 4896 void
4908 gui_mch_post_balloon(beval, mesg) 4897 gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
4909 BalloonEval *beval;
4910 char_u *mesg;
4911 { 4898 {
4912 POINT pt; 4899 POINT pt;
4913 // TRACE0("gui_mch_post_balloon {{{"); 4900 // TRACE0("gui_mch_post_balloon {{{");
4914 if (beval->showState == ShS_SHOWING) 4901 if (beval->showState == ShS_SHOWING)
4915 return; 4902 return;
4926 // TRACE0("gui_mch_post_balloon }}}"); 4913 // TRACE0("gui_mch_post_balloon }}}");
4927 } 4914 }
4928 4915
4929 /*ARGSUSED*/ 4916 /*ARGSUSED*/
4930 BalloonEval * 4917 BalloonEval *
4931 gui_mch_create_beval_area(target, mesg, mesgCB, clientData) 4918 gui_mch_create_beval_area(
4932 void *target; /* ignored, always use s_textArea */ 4919 void *target, /* ignored, always use s_textArea */
4933 char_u *mesg; 4920 char_u *mesg,
4934 void (*mesgCB)(BalloonEval *, int); 4921 void (*mesgCB)(BalloonEval *, int),
4935 void *clientData; 4922 void *clientData)
4936 { 4923 {
4937 /* partially stolen from gui_beval.c */ 4924 /* partially stolen from gui_beval.c */
4938 BalloonEval *beval; 4925 BalloonEval *beval;
4939 4926
4940 if (mesg != NULL && mesgCB != NULL) 4927 if (mesg != NULL && mesgCB != NULL)
5008 || (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST)) 4995 || (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST))
5009 LastActivity = GetTickCount(); 4996 LastActivity = GetTickCount();
5010 } 4997 }
5011 4998
5012 void 4999 void
5013 gui_mch_destroy_beval_area(beval) 5000 gui_mch_destroy_beval_area(BalloonEval *beval)
5014 BalloonEval *beval;
5015 { 5001 {
5016 vim_free(beval); 5002 vim_free(beval);
5017 } 5003 }
5018 #endif /* FEAT_BEVAL */ 5004 #endif /* FEAT_BEVAL */
5019 5005