# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1492684609 0 # Node ID 0448507827e60a54d91e05f05b5db278ff602a7a # Parent c47a04d83b90f2cae83fc88cd6bcbb45600a8f1f Added dw_mle_set_auto_complete() stubs for OS/2 and Windows... Updates to support RichEdit 4.1 control on Windows if enabled. This should allow us to support auto complete in the future. diff -r c47a04d83b90 -r 0448507827e6 mac/dw.m --- a/mac/dw.m Thu Apr 20 09:57:15 2017 +0000 +++ b/mac/dw.m Thu Apr 20 10:36:49 2017 +0000 @@ -2,7 +2,7 @@ * Dynamic Windows: * A GTK like implementation of the MacOS GUI using Cocoa * - * (C) 2011-2016 Brian Smith + * (C) 2011-2017 Brian Smith * (C) 2011 Mark Hessling * * Requires 10.5 or later. diff -r c47a04d83b90 -r 0448507827e6 os2/dw.c --- a/os2/dw.c Thu Apr 20 09:57:15 2017 +0000 +++ b/os2/dw.c Thu Apr 20 10:36:49 2017 +0000 @@ -2,7 +2,7 @@ * Dynamic Windows: * A GTK like implementation of the PM GUI * - * (C) 2000-2012 Brian Smith + * (C) 2000-2017 Brian Smith * (C) 2003-2011 Mark Hessling * (C) 2000 Achim Hasenmueller * (C) 2000 Peter Nielsen @@ -8816,6 +8816,16 @@ } /* + * Sets the word auto complete state of an MLE box. + * Parameters: + * handle: Handle to the MLE. + * state: Bitwise combination of DW_MLE_COMPLETE_TEXT/DASH/QUOTE + */ +void API dw_mle_set_auto_complete(HWND handle, int state) +{ +} + +/* * Sets the current cursor position of an MLE box. * Parameters: * handle: Handle to the MLE to be positioned. diff -r c47a04d83b90 -r 0448507827e6 os2/dw.def --- a/os2/dw.def Thu Apr 20 09:57:15 2017 +0000 +++ b/os2/dw.def Thu Apr 20 10:36:49 2017 +0000 @@ -122,6 +122,7 @@ dw_mle_search @180 dw_mle_set_editable @181 dw_mle_set_word_wrap @182 + dw_mle_set_auto_complete @183 dw_spinbutton_new @190 dw_spinbutton_set_pos @191 diff -r c47a04d83b90 -r 0448507827e6 win/dw-mingw.def --- a/win/dw-mingw.def Thu Apr 20 09:57:15 2017 +0000 +++ b/win/dw-mingw.def Thu Apr 20 10:36:49 2017 +0000 @@ -121,6 +121,7 @@ dw_mle_search @180 dw_mle_set_editable @181 dw_mle_set_word_wrap @182 + dw_mle_set_auto_complete @183 dw_spinbutton_new @190 dw_spinbutton_set_pos @191 diff -r c47a04d83b90 -r 0448507827e6 win/dw.c --- a/win/dw.c Thu Apr 20 09:57:15 2017 +0000 +++ b/win/dw.c Thu Apr 20 10:36:49 2017 +0000 @@ -2,7 +2,7 @@ * Dynamic Windows: * A GTK like implementation of the Win32 GUI * - * (C) 2000-2015 Brian Smith + * (C) 2000-2017 Brian Smith * (C) 2003-2011 Mark Hessling * */ @@ -223,6 +223,7 @@ /* Needed for Rich Edit controls */ HANDLE hrichedit = 0; +HANDLE hmsftedit = 0; /* * MinGW Is missing a bunch of definitions @@ -3985,9 +3986,12 @@ } #endif #ifdef RICHEDIT - /* Attempt to load rich edit library */ - if(!(hrichedit = LoadLibrary("riched20"))) - hrichedit = LoadLibrary("riched32"); + /* Attempt to load rich edit library: 4.1, 3/2.0 and 1.0 */ + if(!(hmsftedit = LoadLibrary("msftedit"))) + { + if(!(hrichedit = LoadLibrary("riched20"))) + hrichedit = LoadLibrary("riched32"); + } #endif return 0; } @@ -4620,7 +4624,8 @@ } /* Entryfields and MLE */ else if(_tcsnicmp(tmpbuf, EDITCLASSNAME, _tcslen(EDITCLASSNAME)+1) == 0 || - _tcsnicmp(tmpbuf, RICHEDIT_CLASS, _tcslen(RICHEDIT_CLASS)+1) == 0) + _tcsnicmp(tmpbuf, RICHEDIT_CLASS, _tcslen(RICHEDIT_CLASS)+1) == 0 || + _tcsnicmp(tmpbuf, MSFTEDIT_CLASS, _tcslen(MSFTEDIT_CLASS)+1) == 0) { LONG style = GetWindowLong(handle, GWL_STYLE); if((style & ES_MULTILINE)) @@ -5932,7 +5937,7 @@ { HWND tmp = CreateWindowEx(WS_EX_CLIENTEDGE, - hrichedit ? RICHEDIT_CLASS : EDITCLASSNAME, + hmsftedit ? MSFTEDIT_CLASS : (hrichedit ? RICHEDIT_CLASS : EDITCLASSNAME), NULL, WS_VISIBLE | WS_BORDER | WS_VSCROLL | ES_MULTILINE | @@ -8389,7 +8394,7 @@ else dw_window_set_style(handle, ES_AUTOHSCROLL, ES_AUTOHSCROLL); /* If it is a rich edit control use the rich edit message */ - if(hrichedit) + if(hrichedit || hmsftedit) { if(state) SendMessage(handle, EM_SETOPTIONS, (WPARAM)ECOOP_AND, (LPARAM)~ECO_AUTOHSCROLL); @@ -8399,6 +8404,16 @@ } /* + * Sets the word auto complete state of an MLE box. + * Parameters: + * handle: Handle to the MLE. + * state: Bitwise combination of DW_MLE_COMPLETE_TEXT/DASH/QUOTE + */ +void API dw_mle_set_auto_complete(HWND handle, int state) +{ +} + +/* * Sets the current cursor position of an MLE box. * Parameters: * handle: Handle to the MLE to be positioned. diff -r c47a04d83b90 -r 0448507827e6 win/dw.def --- a/win/dw.def Thu Apr 20 09:57:15 2017 +0000 +++ b/win/dw.def Thu Apr 20 10:36:49 2017 +0000 @@ -121,6 +121,7 @@ dw_mle_search @180 dw_mle_set_editable @181 dw_mle_set_word_wrap @182 + dw_mle_set_auto_complete @183 dw_spinbutton_new @190 dw_spinbutton_set_pos @191