Commit graph

103 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 9adc538c9c
[IMM32] Rewrite ImmSetActiveContext (#3982)
- Re-implement ImmSetActiveContext function.
- Modify NtUserNotifyIMEStatus prototype.
- Improve ImmSetConversionStatus and ImmSetOpenStatus functions.
CORE-11700
2021-10-01 03:02:56 +09:00
James Tabor fc16259faf [GDI32] Update Wine Metafile Code
Sync/Port: Metafile code from wine.

Patches by Jacek Caban, Daniel Lehman, Zhiyi Zhang. Gabriel Ivancescu, Michael Stefaniuc, Francois Gouget, Nikolay Sivov Dmitry Timoshkov, Andrew EiKum, Piotr Caban and Alexandre Julliard.

This commit is dedicated to George Bisoc!
2021-09-27 16:18:20 -05:00
Katayama Hirofumi MZ b3382d8d24
[IMM32] Rewrite ImmLockIMC (#3975)
- Add Imm32InitContext and Imm32LockIMCEx helper functions.
- Re-implement ImmLockIMC function.
- Modify CLIENTIMC and INPUTCONTEXTDX structures.
CORE-11700
2021-09-27 09:32:24 +09:00
James Tabor 970344bd16 [Win32SS|GDI] Implement seldom used API and update types for local DC's.
Two working in house application require these API. Known as FolCOL and Reach.
2021-09-25 11:57:26 -05:00
Katayama Hirofumi MZ ca3fa7197d
[IMM32] Use Imm32IsImmMode and Imm32IsCiceroMode macros (#3971)
- Define Imm32IsImmMode, Imm32IsCiceroMode and Imm32Is16BitMode macros in "precomp.h".
- Improve Imm32InquireIme and Imm32CleanupContext functions.
- Add IME_SYSINFO_WINLOGON and IME_SYSINFO_WOW16 macros (from DDK) in psdk/imm.h.
- Modify CtfImeInquireExW and CtfImeSelectEx prototype.
CORE-11700
2021-09-24 22:06:29 +09:00
Katayama Hirofumi MZ df6fff78bb
[IMM32] Rewrite ImmAssociateContextEx (#3961)
- Rewrite ImmAssociateContextEx function.
- Modify NtUserAssociateInputContext prototype.
CORE-11700
2021-09-16 19:29:49 +09:00
Katayama Hirofumi MZ afb6c8a129
[IMM32] Rewrite ImmEscapeA/W (#3959)
- Rewrite ImmEscapeA and ImmEscapeW functions.
- Delete useless legacy code.
CORE-11700
2021-09-16 19:27:43 +09:00
Hermès Bélusca-Maïto 9393fc320e
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00
Hermès Bélusca-Maïto a407cb8f10
[WIN32SS:NTUSER] Update the definition of SHAREDINFO and fix the definition of FNID_LAST. (#3937) 2021-09-09 16:15:11 +02:00
Katayama Hirofumi MZ a8d2cd4b9d
[IMM32] Rewrite ImmGetContext (#3923)
- Add ValidateHwndNoErr and Imm32GetContextEx helper functions.
- Rewrite ImmGetContext function by using the helper functions.
CORE-11700
2021-08-24 06:50:39 +09:00
Katayama Hirofumi MZ 10c9aa067f
[NTUSER] Improve NtUserQueryWindow (#3915)
- Improve NtUserQueryWindow function.
- Add IMC structure.
- Modify THREADINFO structure.
CORE-11700
2021-08-21 07:31:10 +09:00
Katayama Hirofumi MZ 1d0587fc27
[IMM32] Rewrite ImmProcessKey (#3917)
- Rewrite ImmProcessKey function.
- Modify win32ss/include/imetable.h.
- Modify ImmProcessKey prototype.
CORE-1170
2021-08-21 07:22:43 +09:00
Katayama Hirofumi MZ c59c185d1c
[INCLUDE] Move WM_IME_SYSTEM from ntuser.h to undocuser.h (#3920)
CORE-11700
2021-08-19 08:18:20 +09:00
Katayama Hirofumi MZ 1f792413f0 [NTUSER][INCLUDE] s/TransMsg[1]/TransMsg[ANYSIZE_ARRAY]/
CORE-11700
2021-08-18 19:59:35 +09:00
Katayama Hirofumi MZ d83be2e6b6 [NTUSER][INCLUDE] Trivial formatting of TRANSMSG and TRANSMSGLIST
CORE-11700
2021-08-18 19:56:47 +09:00
Katayama Hirofumi MZ f4bc74edc3
[IMM32] ImmGenerateMessage and ImmTranslateMessage (#3914)
- Rewrite `ImmGenerateMessage` and `ImmTranslateMessage` functions.
- Rename `INPUTCONTEXTDX.bHasVKey` as `bNeedsTrans`.
- Move `TRANSMSG` structure into `ntuser.h`.
- Add `TRANSMSGLIST` structure into `ntuser.h`.
- Add `UNDETERMINESTRUCT` structure to `ddk/imm.h`.
- Modify `NtUserGetAppImeLevel` prototype.
CORE-11700
2021-08-18 08:42:12 +09:00
Katayama Hirofumi MZ 77911014f3
[IMM32] Rewrite ImmIsUIMessageA/W (#3907)
- Rewrite ImmIsUIMessageA and ImmIsUIMessageW functions.
- Modify HIMC and HIMCC handle types for strictness. Add typecasts.
- Add WM_IME_SYSTEM macro.
- Modify imm32.spec.
CORE-11700
2021-08-16 15:33:51 +09:00
Katayama Hirofumi MZ cc097ec485
[IMM32] Rewrite ImmEnumRegisterWordA/W (#3906)
- Rewrite ImmEnumRegisterWordA and ImmEnumRegisterWordW functions.
- Modify win32ss/include/imetable.h.
CORE-11700
2021-08-16 15:31:39 +09:00
Katayama Hirofumi MZ 19d24143e9
[IMM32] Rewrite ImmGetRegisterWordStyleA/W (#3901)
- Rewrite ImmGetRegisterWordStyleA and ImmGetRegisterWordStyleW functions.
- Modify win32ss/include/imetable.h.
CORE-11700
2021-08-14 10:39:20 +09:00
Katayama Hirofumi MZ 1e62771c78
[IMM32] Rewrite ImmRegisterWordA (#3881)
- Rewrite ImmRegisterWordA function.
- Modify imetable.h.
CORE-11700
2021-08-10 08:08:23 +09:00
Katayama Hirofumi MZ 692a30a84a
[IMM32] ImmCreateContext, ImmDestroyContext, DllMain etc. (#3867)
- Rewrite ImmCreateContext, ImmDestroyContext, and DllMain functions.
- Add g_hImm32Inst, g_bClientRegd, and g_SharedInfo global variables. Delete g_dwImm32Flags (that was g_psi->dwSRVIFlags).
- Implement ImmLoadIME and ImmRegisterClient functions.
- Modify CLIENTIMC and IMEDPI structures. Move CLIENTIMC definition into ntuser.h.
- Add file win32ss/include/imetable.h.
- Rename SRVINFO_METRICS macro as SRVINFO_CICERO_ENABLED.
CORE-11700
2021-08-04 09:41:59 +09:00
Katayama Hirofumi MZ d7f13aa696
[IMM32] Improve ImmSimulateHotKey (#3858)
- Improve ImmSimulateHotKey function.
- Modify IMEDPI structure.
CORE-11700
2021-07-31 15:56:11 +09:00
Katayama Hirofumi MZ 89cb8a38b3
[IMM32] Rewrite ImmEnumInputContext (#3859)
- Rewrite ImmEnumInputContext function.
- Modify NtUserBuildHimcList.
CORE-11700
2021-07-31 15:45:07 +09:00
Katayama Hirofumi MZ ecb0c0963d
[IMM32] Imm(Lock|Unlock)ImeDpi and ImmSetOpenStatus (#3830)
- Add IMEDPI structure to ntuser.h.
- Implement ImmLockImeDpi/ImmUnlockImeDpi functions.
- Rewrite ImmSetOpenStatus function.
- Modify some NTUSER function prototypes.
- Modify imm32.spec.
CORE-11700
2021-07-25 11:57:57 +09:00
Katayama Hirofumi MZ 97847f2078
[IMM32] Improve ImmGetImeInfoEx (#3833)
- Rewrite ImmGetImeInfoEx function.
- Implement CtfImmIsTextFrameServiceDisabled function.
- Modify imm32.spec.
CORE-11700
2021-07-25 11:56:17 +09:00
Katayama Hirofumi MZ 92393a7517
[IMM32] Add some candidate handlings (#3799)
- Implement ImmGetCandidateListA and ImmGetCandidateListW, by using newly added ImmGetCandidateListAW function.
- Implement ImmLockClientImc and ImmUnlockClientImc functions.
- Modify imm32.spec.
- Remove #ifdef's.
CORE-11700
2021-07-11 09:48:15 +09:00
Katayama Hirofumi MZ 211de1257e
[IMM32] Rewrite ImmIsIME (Retry) (#3803)
- Rewrite ImmIsIME function.
- Fix enum IMEINFOEXCLASS.
CORE-11700
2021-07-08 14:23:25 +09:00
Timo Kreuzer d07203ecb7 [WIN32K][USER32] Change mechanism for storing dialog info pointer
DLGWINDOWEXTRA is 30 (both on win32 and win64). This has storage for the following entries: DWLP_MSGRESULT (0), DWLP_DLGPROC (8), DWLP_USER (16)
We used to store the dialog info pointer using SetWindowLongPtr (DWLP_ROS_DIALOGINFO == DWLP_USER+sizeof(ULONG_PTR) == 24), which was fine on win32, but failed on win64, since there wasn't enough space left (24 + 8 = 32 > 30).
Rewrite the way the DLGINFO pointer is stored, by adding an additional field to the WND structure and set it using NtUserxSetDialogPointer (which is what it is for).
Also fix too small cbWndExtra for the button class.
2021-05-28 08:26:36 +02:00
Katayama Hirofumi MZ 4b038ec8b7
[IMM32][NTUSER] Add ImmGetImeInfoEx (#3035)
- Add the definition of imm32!ImmGetImeInfoEx function.
- Add IMEINFOEXCLASS and IS_IME_HKL into "ntuser.h".
- Modify NtUserGetImeInfoEx function prototype.
CORE-11700
2020-08-12 06:03:29 +09:00
Katayama Hirofumi MZ 047da7e632
[NTUSER] Add more QUERY_WINDOW_* values (#3034)
Add QUERY_WINDOW_* constant values for NtUserQueryWindow funciton. CORE-11700
2020-08-12 06:01:22 +09:00
Katayama Hirofumi MZ ec9d277d59
[IMM32][NTUSER] Implement ImmGetHotKey (#3025)
CORE-11700
- Implement imm32!ImmGetHotKey function.
- Modify NtUserGetImeHotKey function.
- Add LPHKL typedef into <imm.h> header.
2020-08-09 22:41:11 +09:00
James Tabor cba5acbc48 [NtGDI] Add missing type for EPS Print Escape
Part of GDI escape printing.
2020-05-12 20:34:22 -05:00
Serge Gautherie ded98b846e
[WIN32K:NTUSER] ntuser.h: Rename NtUserWaitForInputIdle() 3rd parameter (#2499)
Addendum to 568b6d05.
2020-04-03 15:06:25 +02:00
jimtabor 915a5764a9 [Win32SS] Form Sanity to Hook Callbacks
Fix WH_CALLWNDPROC/RET data to user hook calls. See CORE-13019 and CORE-13907.
2020-03-28 14:18:14 -05:00
Hermès Bélusca-Maïto a8e7defb01
[WIN32SS:USER] Some minimal work and fixes concerning message queues timeouts.
CORE-15147

- Rename CLIENTTHREADINFO::tickLastMsgChecked into timeLastRead as
  documented in https://reactos.org/wiki/Techwiki:Win32k/CLIENTTHREADINFO .
  This is the last time the message queue was read.

- This is the structure member one must compare against the current tick
  count timestamp in order to heuristically determine whether a message
  queue thread is hung!! Fix MsqIsHung() in accordance, add extra debug
  logging in order to help us determining which of our code present
  regular GUI hangs, and add as well an extra "TimeOut" parameter so as
  not to hardcode a fixed value within that function but instead
  allowing its caller to specify possible different values.

- THREADINFO::timeLast is on the contrary the last message time stamp,
  and will definitively differ from CLIENTTHREADINFO::timeLastRead .
  It should only be used for information purposes!

- Accordingly, in NtUserGetThreadState()::THREADSTATE_UPTIMELASTREAD
  and in InitThreadCallback(), only (re-)initialize the timeLastRead
  member of the CLIENTTHREADINFO structure of the THREADINFO of interest.

- In co_IntPeekMessage(), update more often the timeLastRead timestamp
  whenever the current message queue has been read (but NOT timeLast!!
  That one will be updated ONLY WHEN a message is found!).

- In co_IntSendMessageTimeoutSingle() first check whether the window to
  which we send the message is being destroyed, before checking for
  queue hangs etc. Collapse the logic checks for queue hang and increase
  the hang timeout check to 4 times MSQ_HUNG (== 4 * 5 seconds) and
  display a debug trace.
2019-12-29 16:14:15 +01:00
James Tabor d48345a0ee Update Headers for Printing and Other
Add missing flags and function types. Fix typos.
2019-08-15 21:39:26 -05:00
jimtabor 4563ca28d3 [GDI32] Add more to Local DC structure.
Make the two structures identical. These are used for printing and
enhanced metafile support.
2019-07-27 14:13:14 -05:00
James Tabor 40c42305c3 [Win32SS] Add Driver Callback
Add user driver callback to be used later on.
2019-06-21 13:10:03 -05:00
jimtabor da264743e1 [Win32SS] Support Clipboard Metafile
Major fix ups and plugging in missing code changes. Handle code is from
another project currently being developed for ReactOS.
See CORE-12143
2019-05-31 21:44:17 -05:00
Andrew Boyarshin 458a26ab76
[WIN32SS:NTUSER] Use the 2nd parameter of NtUserGetThreadDesktop() as fallback. (#1065)
- The 2nd parameter is already passed in user-mode by GetThreadDesktop().
  It is then used by NtUserGetThreadDesktop() as a fallback for console
  threads.

- Lookup and validate the thread by using the IntTID2PTI() helper.
- Don't reference the desktop with too many access rights.
- Get rid of the old-school DECLARE_RETURN() & co. macros.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-04-28 19:27:45 +02:00
Katayama Hirofumi MZ 811faed421
[GDI32][NTGDI][SETUP] Fix font enumeration part 2 (#1492)
Eliminate some bugs about font enumeration. CORE-15755

- Add "Microsoft Sans Serif" font substitution.
- Fix and improve the treatment of the nominal font names.
- Split IntGetFontFamilyInfo function from NtGdiGetFontFamilyInfo.
- Add DoFontSystemUnittest function for font system unittest to GDI32.
- Call DoFontSystemUnittest function at CreateFontIndirectW first call.
2019-04-11 11:46:52 +09:00
James Tabor d57f7becc3 [Win32SS] Add TextOut to GDI Batch
Add fix ups to PolyPatBlt and freetype.
TextOut supports 580 characters w/o Dx and Dx at a max of 193 characters
with Dx*1, both if offset is 0.

Noticed a lot of over drawing with start menu from ComCtl32 SB_SETTEXT
going through User32 DrawText/Worker ExtTextOutW. Explain why it might
be slowing down.

If issues arise, commenting out lines in win32ss/include/gdi32p.h can
help.

Example:
else if (Cmd == GdiBCTextOut) cjSize = 0;//sizeof(GDIBSTEXTOUT); <----
this one most of all.
 else if (Cmd == GdiBCExtTextOut) cjSize = 0;//sizeof(GDIBSEXTTEXTOUT);

Test results:
https://reactos.org/testman/compare.php?ids=66260,66262
2019-03-08 22:21:41 -06:00
Katayama Hirofumi MZ f469acacec
[WIN32SS][USER32] Add Ghost codes (retrial of #1100) (#1112)
CORE-11944
2018-12-11 12:30:59 +09:00
Katayama Hirofumi MZ 99b055a506
Revert "[WIN32SS][USER32] Add codes for Ghost Window (#1100)" (#1110)
This reverts commit 1adefd180c. ReactOS wouldn't startup.
2018-12-11 11:30:00 +09:00
Katayama Hirofumi MZ 1adefd180c
[WIN32SS][USER32] Add codes for Ghost Window (#1100)
CORE-11944
2018-12-11 10:48:23 +09:00
Baruch Rutman e7d2bbe726 [WIN32SS][LPK] Add BiDi support to menus and window captions (#738)
Added callback function that redirects calls to GreExtTextOutW that didn't went through lpk BiDi processing, calls that are from the kernel.

Completely solves JIRA issue CORE-6910.
2018-08-23 19:43:12 +02:00
Hermès Bélusca-Maïto c697f191cf
[WIN32K:NTUSER] Make NtUserResolveDesktop() and IntResolveDesktop() work in a more Win2k3-compatible manner.
CORE-11933 and PR #621.

Since this API is also called from WINSRV when calling the AllocConsole() API,
it can be tested more-or-less easily. The internal helper IntResolveDesktop()
is also tested during process connection to a window station, when such process
first calls a USER32 or GDI32 function.
This is also the functionality tested by the user32:desktop apitest.

- Adjust how IntResolveDesktop() is called.
2018-08-19 22:18:37 +02:00
Hermès Bélusca-Maïto b003d68ca5
[WIN32SS:NTUSER] Update SetWindowStationUser() and NtUserSetWindowStationUser() prototypes.
Also, improve NtUserSetWindowStationUser() capture order, make psid optional as it should (and avoid a user-mode triggered BSOD), and initialize luidUser only when everything succeeded.
2018-07-22 19:26:53 +02:00
Timo Kreuzer 2d9c88e0c5
[WIN32K] Fix 64 bit issues (#420)
- Fix ULONG/SIZE_T issues
- Use LOWORD/HIWORD
- Change a struct member to HANDLE
- Implement lstrlenW helper function
2018-03-18 15:53:52 +01:00
Timo Kreuzer 173971d947 [WIN32K] Implement NtUserSetWindowLongPtr for 64 bit builds
Also fix return type of NtUserQueryWindow and type of WND::dwUserData and the value for bAnsi in SetWindowLongPtrA
2018-02-19 22:36:36 +01:00
Giannis Adamopoulos c5db5399dc [USER32] Implement the index -1 for GetWindowLong which returns a pointer to WW
We don't have this struct but WND already contains the same fields in the right
order so we can just return the pointer to the first one.

The meaning of the -1 index was found here: http://www.geoffchappell.com/studies/windows/win32/user32/structs/wnd/index.htm
2017-12-25 00:12:45 +02:00
jimtabor d85023c9c9 [GDI] - Add type for setting world transform modification modes.
References:
https://msdn.microsoft.com/en-us/library/cc230538.aspx
https://github.com/KDE/krita/blob/master/libs/vectorimage/libemf/EmfEnums.h
2017-11-24 17:22:43 -06:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00