Skip to content

Commit

Permalink
Add BiDi stubs (otya128#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
otya128 committed May 12, 2019
1 parent c4ee51e commit 736c99c
Show file tree
Hide file tree
Showing 5 changed files with 353 additions and 40 deletions.
188 changes: 178 additions & 10 deletions gdi/bidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,40 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
/***********************************************************************
* RawTextOut (GDI.530)
*/
LONG WINAPI RawTextOut16(void) { FIXME("stub (no prototype)\n"); return 0; }
LONG WINAPI RawTextOut16(HDC16 hdc, INT16 x, INT16 y, LPCSTR str, INT16 count)
{
FIXME("(%04x,%d,%d,%s,%d)\n", hdc, x, y, debugstr_an(str, count), count);
return TextOut16(hdc, x, y, str, count);
}

/***********************************************************************
* RawExtTextOut (GDI.531)
*/
LONG WINAPI RawExtTextOut16(void) { FIXME("stub (no prototype)\n"); return 0; }
LONG WINAPI RawExtTextOut16( HDC16 hdc, INT16 x, INT16 y, UINT16 flags,
const RECT16 *lprect, LPCSTR str, UINT16 count,
const INT16 *lpDx )
{
FIXME("(%04x,%d,%d,%04x,%p,%s,%d,%p)\n", hdc, x, y, flags, lprect,
debugstr_an(str, count), count, lpDx);
return ExtTextOut16(hdc, x, y, flags, lprect, str, count, lpDx);
}

/***********************************************************************
* RawGetTextExtent (GDI.532)
*/
LONG WINAPI RawGetTextExtent16(HDC16 hdc, LPCSTR lpszString, INT16 cbString ) {
LONG WINAPI RawGetTextExtent16(HDC16 hdc, LPCSTR lpszString, INT16 cbString )
{
FIXME("(%04hx, %p, %hd): stub\n", hdc, lpszString, cbString);
return 0;
return GetTextExtent16(hdc, lpszString, cbString);
}

/***********************************************************************
* RawGetTextExtentEx (GDI.533)
*/
LONG WINAPI RawGetTextExtentEx16(void)
{
FIXME("stub (no prototype)\n");
return 0;
}

/***********************************************************************
Expand All @@ -52,24 +73,107 @@ LONG WINAPI RawGetTextExtent16(HDC16 hdc, LPCSTR lpszString, INT16 cbString ) {
LONG WINAPI BiDiLayout16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCreateTabString (GDI.538)
* BiDiCreateTabString (GDI.537)
*/
LONG WINAPI BiDiCreateTabString16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCreateString (GDI.538)
*/
LONG WINAPI BiDiCreateString16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiStringOut (GDI.539)
*/
LONG WINAPI BiDiStringOut16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiGlyphOut (GDI.540)
*/
LONG WINAPI BiDiGlyphOut16(void) { FIXME("stub (no prototype)\n"); return 0; }
LONG WINAPI BiDiGlyphOut16(WORD a1, WORD a2, WORD a3, WORD a4, LPCSTR a5, WORD a6, WORD a7, WORD a8)
{
FIXME("stub(%04x,%04x,%04x,%04x,%s,%04x,%04x,%04x)\n", a1, a2, a3, a4, debugstr_a(a5), a6, a7, a8);
return 0;
}

/***********************************************************************
* BiDiJustifyString (GDI.541)
*/
LONG WINAPI BiDiJustifyString16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiSetStringTabs (GDI.542)
*/
LONG WINAPI BiDiSetStringTabs16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiGetStringExtent (GDI.543)
*/
LONG WINAPI BiDiGetStringExtent16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiGetNextGlyph (GDI.544)
*/
LONG WINAPI BiDiGetNextGlyph16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiGetPrevGlyph (GDI.545)
*/
LONG WINAPI BiDiGetPrevGlyph16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiIsStringRTL (GDI.546)
*/
LONG WINAPI BiDiIsStringRTL16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiGlyphLength (GDI.547)
*/
LONG WINAPI BiDiGlyphLength16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCaretStringToPel (GDI.548)
*/
LONG WINAPI BiDiCaretStringTopel16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCaretPelToString (GDI.549)
*/
LONG WINAPI BiDiCaretPelToString16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiStringToGlyph (GDI.550)
*/
LONG WINAPI BiDiStringToGlyph16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiGlyphToString (GDI.551)
*/
LONG WINAPI BiDiGlyphToString16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiPelToGlyph (GDI.552)
*/
LONG WINAPI BiDiPelToGlyph16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiGlyphToPel (GDI.553)
*/
LONG WINAPI BiDiGlyphToPel16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiBounds (GDI.554)
*/
LONG WINAPI BiDiBounds16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiDeleteString (GDI.555)
*/
LONG WINAPI BiDiDeleteString16(void) { FIXME("stub (no prototype)\n"); return 0; }
LONG WINAPI BiDiDeleteString16(WORD a1)
{
FIXME("stub(%04x)\n", a1);
return 0;
}

/***********************************************************************
* BiDiSetDefaults (GDI.556)
Expand All @@ -81,6 +185,15 @@ LONG WINAPI BiDiSetDefaults16(void) { FIXME("stub (no prototype)\n"); return 0;
*/
LONG WINAPI BiDiGetDefaults16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCalcString16 (GDI.559)
*/
LONG WINAPI BiDiCalcString16(WORD a1, WORD a2, LPCSTR a3, WORD a4, WORD a5, WORD a6, WORD a7, WORD a8)
{
FIXME("stub(%04x,%04x,%p,%04x,%04x,%04x,%04x,%04x)\n", a1, a2, a3, a4, a5, a6, a7, a8);
return 0;
}

/***********************************************************************
* BiDiShape (GDI.560)
*/
Expand All @@ -91,6 +204,11 @@ LONG WINAPI BiDiShape16(void) { FIXME("stub (no prototype)\n"); return 0; }
*/
LONG WINAPI BiDiFontComplement16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCalcTabString (GDI.563)
*/
LONG WINAPI BiDiCalcTabString16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiSetKashida (GDI.564)
*/
Expand All @@ -109,7 +227,16 @@ LONG WINAPI BiDiShapeEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
/***********************************************************************
* BiDiCreateStringEx (GDI.569)
*/
LONG WINAPI BiDiCreateStringEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
LONG WINAPI BiDiCreateStringEx16(WORD a1, WORD a2, WORD a3, LPVOID a4, WORD a5, WORD a6, WORD a7, WORD a8, WORD a9)
{
FIXME("stub(%04x,%04x,%04x,%p,%04x,%04x,%04x,%04x,%04x)\n", a1, a2, a3, a4, a5, a6, a7, a8, a9);
return 0;
}

/***********************************************************************
* GetUnicodeMap (GDI.570)
*/
LONG WINAPI GetUnicodeMap16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* GetTextExtentRtoL (GDI.571)
Expand All @@ -119,9 +246,50 @@ LONG WINAPI GetTextExtentRtoL16(void) { FIXME("stub (no prototype)\n"); return 0
/***********************************************************************
* GetHDCCharSet (GDI.572)
*/
LONG WINAPI GetHDCCharSet16(void) { FIXME("stub (no prototype)\n"); return 0; }
LONG WINAPI GetHDCCharSet16(HDC16 a1)
{
FIXME("stub(%04x)\n", a1);
return 0;
}

/***********************************************************************
* BiDiLayoutEx (GDI.573)
*/
LONG WINAPI BiDiLayoutEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
LONG WINAPI BiDiLayoutEx16(LPVOID a1, WORD a2, WORD a3, WORD a4, LPVOID a5, WORD a6, WORD a7, WORD a8, WORD a9, LPVOID a10, LPVOID a11, WORD a12, WORD a13, WORD a14)
{
FIXME("stub(%p,%04x,%04x,%04x,%p,%04x,%04x,%04x,%04x,%p,%p,%04x,%04x,%04x)\n", a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
return 0;
}

/***********************************************************************
* BiDiCreateTabStringEx (GDI.574)
*/
LONG WINAPI BiDiCreateTabStringEx16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCalcTabStringEx (GDI.575)
*/
LONG WINAPI BiDiCalcTabStringEx16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiCalcStringEx (GDI.576)
*/
LONG WINAPI BiDiCalcStringEx16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* SetTextCodePage (GDI.588)
*/
LONG WINAPI SetTextCodePage16(WORD a1, WORD a2)
{
FIXME("stub(%04x,%04x)\n", a1, a2);
return 0;
}

/***********************************************************************
* GetTextCodePage (GDI.589)
*/
LONG WINAPI GetTextCodePage16()
{
FIXME("stub(np)\n");
return 0;
}
40 changes: 32 additions & 8 deletions gdi/gdi.exe16.spec
Original file line number Diff line number Diff line change
Expand Up @@ -369,25 +369,49 @@
528 stub GDIParametersInfo
529 pascal -ret16 CreateHalftonePalette(word) CreateHalftonePalette16
# Hebrew version API's
530 pascal -ret16 RawTextOut() RawTextOut16
531 pascal -ret16 RawExtTextOut() RawExtTextOut16
530 pascal -ret16 RawTextOut(word s_word s_word str word) RawTextOut16
531 pascal -ret16 RawExtTextOut(word s_word s_word word ptr str word ptr) RawExtTextOut16
532 pascal -ret16 RawGetTextExtent(word str word) RawGetTextExtent16
533 pascal -ret16 RawGetTextExtentEx() RawGetTextExtentEx16
536 pascal -ret16 BiDiLayout() BiDiLayout16
538 pascal -ret16 BiDiCreateTabString() BiDiCreateTabString16
540 pascal -ret16 BiDiGlyphOut() BiDiGlyphOut16
537 pascal -ret16 BiDiCreateTabString() BiDiCreateTabString16
538 pascal -ret16 BiDiCreateString() BiDiCreateString16
539 pascal -ret16 BiDiStringOut() BiDiStringOut16
540 pascal -ret16 BiDiGlyphOut(word word word word str word word word) BiDiGlyphOut16
541 pascal -ret16 BiDiJustifyString() BiDiJustifyString16
542 pascal -ret16 BiDiSetStringTabs() BiDiSetStringTabs16
543 pascal -ret16 BiDiGetStringExtent() BiDiGetStringExtent16
555 pascal -ret16 BiDiDeleteString() BiDiDeleteString16
544 pascal -ret16 BiDiGetNextGlyph() BiDiGetNextGlyph16
545 pascal -ret16 BiDiGetPrevGlyph() BiDiGetPrevGlyph16
546 pascal -ret16 BiDiIsStringRTL() BiDiIsStringRTL16
547 pascal -ret16 BiDiGlyphLength() BiDiGlyphLength16
548 pascal -ret16 BiDiCaretStringToPel() BiDiCaretStringTopel16
549 pascal -ret16 BiDiCaretPelToString() BiDiCaretPelToString16
550 pascal -ret16 BiDiStringToGlyph() BiDiStringToGlyph16
551 pascal -ret16 BiDiGlyphToString() BiDiGlyphToString16
552 pascal -ret16 BiDiPelToGlyph() BiDiPelToGlyph16
553 pascal -ret16 BiDiGlyphToPel() BiDiGlyphToPel16
554 pascal -ret16 BiDiBounds() BiDiBounds16
555 pascal -ret16 BiDiDeleteString(word) BiDiDeleteString16
556 pascal -ret16 BiDiSetDefaults() BiDiSetDefaults16
558 pascal -ret16 BiDiGetDefaults() BiDiGetDefaults16
559 pascal -ret16 BiDiCalcString(word word ptr word word word word word) BiDiCalcString16
560 pascal -ret16 BiDiShape() BiDiShape16
561 pascal -ret16 BiDiFontComplement() BiDiFontComplement16
563 pascal -ret16 BiDiCalcTabString() BiDiCalcTabString16
564 pascal -ret16 BiDiSetKashida() BiDiSetKashida16
565 pascal -ret16 BiDiKExtTextOut() BiDiKExtTextOut16
566 pascal -ret16 BiDiShapeEx() BiDiShapeEx16
569 pascal -ret16 BiDiCreateStringEx() BiDiCreateStringEx16
569 pascal -ret16 BiDiCreateStringEx(word word word ptr word word word word word) BiDiCreateStringEx16
570 pascal -ret16 GetUnicodeMap() GetUnicodeMap16
571 pascal -ret16 GetTextExtentRtoL() GetTextExtentRtoL16
572 pascal -ret16 GetHDCCharSet() GetHDCCharSet16
573 pascal -ret16 BiDiLayoutEx() BiDiLayoutEx16
572 pascal -ret16 GetHDCCharSet(word) GetHDCCharSet16
573 pascal -ret16 BiDiLayoutEx(ptr word word word ptr word word word word ptr ptr word word word) BiDiLayoutEx16
574 pascal -ret16 BiDiCreateTabStringEx() BiDiCreateTabStringEx16
575 pascal -ret16 BiDiCalcTabStringEx() BiDiCalcTabStringEx16
576 pascal -ret16 BiDiCalcStringEx() BiDiCalcStringEx16
588 pascal -ret16 SetTextCodePage(word word) SetTextCodePage16
589 pascal -ret16 GetTextCodePage() GetTextCodePage16
602 pascal -ret16 SetDIBColorTable(word word word ptr) SetDIBColorTable16
603 pascal -ret16 GetDIBColorTable(word word word ptr) GetDIBColorTable16
604 pascal -ret16 SetSolidBrush(word long) SetSolidBrush16
Expand Down
42 changes: 34 additions & 8 deletions user/bidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
*/
LONG WINAPI ChangeDialogTemplate16(void) { FIXME("stub (no prototype)\n"); return 0; }

/***********************************************************************
* BiDiMessageBoxEx (USER.910)
* FIXME: The prototypes of this function have not been found yet.
*/
LONG WINAPI BiDiMessageBoxEx16(void) { FIXME("stub (no prototype)\n"); return 0; }


/******************************************************************************
* ChangeKeyboardCodePage [USER.924]
Expand Down Expand Up @@ -155,7 +149,7 @@ DWORD WINAPI GetBaseCodePage16( void )
HFONT16 WINAPI GetCodePageSystemFont16( UINT16 iFont, UINT16 iCodePage )
{
FIXME( "( %hu, %hu ): stub\n", iFont, iCodePage );
return 0;
return 1;
}


Expand Down Expand Up @@ -247,6 +241,37 @@ UINT WINAPI LoadSystemLanguageString16( HINSTANCE16 hinstCaller, UINT16 id,
return 0;
}

LONG WINAPI FindResourceEx16()
{
FIXME("stub(np)\n");
return 0;
}

LONG WINAPI GetClipboardCodePage16(WORD a1, WORD a2, WORD a3)
{
FIXME("stub(%04x,%04x,%04x)\n", a1, a2, a3);
return 0;
}

LONG WINAPI ResetDialogTemplate16()
{
FIXME("stub(np)\n");
return 0;
}

LONG WINAPI GetLanguageResId16()
{
FIXME("stub(np)\n");
return 0;
}

LONG WINAPI CreateDialogParamML16()
{
FIXME("stub(np)\n");
return 0;
}



/***********************************************************************
* MessageBoxEx [USER.930]
Expand All @@ -267,7 +292,7 @@ LRESULT WINAPI QueryCodePage16( UINT16 idxLang, UINT16 msg,
WPARAM16 wParam, LPARAM lParam )
{
FIXME( "( %hu, %hu, %04hx, %08lx ): stub\n", idxLang, msg, wParam, lParam );
return 0;
return 1;
}

/***********************************************************************
Expand Down Expand Up @@ -319,4 +344,5 @@ BOOL16 WINAPI SetProcessDefaultLayout16( DWORD dwDefaultLayout )
void WINAPI SetWindowTextEx16( HWND16 hwnd, LPCSTR lpsz, UINT16 iLang )
{
FIXME( "( %04hx, %p, %hu ): stub\n", hwnd, lpsz, iLang );
SetWindowTextA(WIN_Handle32(hwnd), lpsz);
}
Loading

0 comments on commit 736c99c

Please sign in to comment.