Commit graph

13 commits

Author SHA1 Message Date
Jérôme Gardou 23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Baruch Rutman 1078479358
[LPK] Implement LpkGetTextExtentExPoint(). (#1362)
- Add argument checking.
- Use logic from NtGdiGetTextExtentExW().
2019-03-23 23:31:02 +01:00
Baruch Rutman 6a3b1879a1 [LPK][GDI32] Enable mirroring via version resource (#965)
Add a mechanism that detects via the version resource whether it's needed to mirror
the application layout or not. This is a "follow up" to commit 5b14b6f.

This code is taken from the GetProcessDefaultLayout() function from Wine
(called there "WIN_CreateWindowEx").

In Windows the version-resource mirroring happens when the GDI is loading the LPK.

- Implement mirroring via version resource. GDI linking on startup is required.

- GDI32: Add LPK loading on GDI startup.

To enable mirroring via version resource the lpk.dll must be loaded before any windows are created.
This is done through GdiInitializeLanguagePack() function which is called in GdiProcessSetup().

- LPK: Use Wine debug messaging.
2018-10-24 21:34:38 +02:00
Baruch Rutman 87c529a537
[LPK] Small fix and a related comment. (#890)
[LPK][USER32] Fix reading layout checks.

- Both functions don't care about DT_RTLREADING flag.
- Added a different method to check reading order.

[USER32] Remove gcc-build breaker semicolon.
2018-10-08 16:17:42 +02:00
Baruch Rutman a494d0583f
[LPK] Implement LpkPSMTextOut(). (#890)
- The function is almost fully implemented, but some return values change wildly.
  The results are mostly compatible to the Windows results.

- Remove #ifdef (this is primary ReactOS code).
2018-10-08 16:16:40 +02:00
Baruch Rutman ab5fdcc01f
[LPK] Make GetCharacterPlacement caret positions respect bidi. (#842)
- Try to make use of ScriptStringCPtoX when trying to fill the lpCaretPos struct member;
  if USP10 error happens fallback to the unreorder method.
- Remove now incorrect debug print.
2018-09-09 18:03:45 +02: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
Baruch Rutman 65a5a989c5
[LPK] Changes (#622).
- Changed how the ScriptIsComplex check is made to account direction, most noticeble on dxdiag,
  https://docs.microsoft.com/en-us/windows/desktop/api/usp10/nf-usp10-scriptiscomplex
  However commented out the ScriptIsComplex flag change because of a bug.

- Added a check and debug print if BIDI_Reorder fails.
2018-07-27 00:47:48 +02:00
Baruch Rutman e054a053ff
[LPK] Added more error handling code (#622).
- Added a codepath if both glyphs and reordered_str arrays are NULL.
- Move variables back to the beginning of function.

CORE-14732
2018-07-27 00:47:28 +02:00
Baruch Rutman 7fe6a14ede
[LPK] Diverse fixes (#622).
- Changed wcspy to strsafe function.
- Use GetCharWidthI instead of GetCharWidth32W if dealing with glyph indices.
2018-07-27 00:47:14 +02:00
Baruch Rutman 33d3e56cf4
[LPK] Refactoring (#622).
- Moved lpDx and lpGlyphs operations to seperate brackets.
- lpGlyphs == NULL checks + memory managment additions.

CORE-14732
2018-07-27 00:46:02 +02:00
Baruch Rutman a4a59ad413 [GDI32][LPK] BiDi support for ExtTextOut and GetCharacterPlacement (#534)
Introduce BiDi (bi-directional text) support for ExtTextOut and GetCharacterPlacement, using Wine's GDI BIDI_Reorder function.
Solves the main issue with CORE-7003.

To be compatible with Win2k3+, introduce the "Language Pack" (LPK) dll.
- All the bidi code is removed from gdi32 and replaced by calls to LPK.
  Gdi32 uses dynamic linking to lpk.dll. In case of linking failure no bidi processing will be available.
- Implemented LpkGetCharacterPlacement.
- Implement LpkExtTextOut.
- Add a demo test program to show how the apis should function.
- Added all the remaining code, added special case for lpDx calculation if also GCP_GLYPHSHAPE flag was called.
  Applications that call GCP that use GCP_GLYPHSHAPE flags should also use the GCP_REORDER flag.
  (As written in https://msdn.microsoft.com/en-us/library/windows/desktop/dd144860(v=vs.85).aspx )
- Add ETO_RTLREADING flag handling.
  Imported the ETO_RTLREADING flag handling from wine, which changes the string part order (runs).
  A RRR1LLLRRR2 string without will show as RRR1LLLRRR2 without it, with it RRR2LLLRRR1.
2018-05-30 14:41:22 +02: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