DevCon for OS/2 - Developer Connection |
Operating systems: ArcaOS, eComStation, IBM OS/2 Warp |
![]()
|
|
GpiEnableYInversion()source: wiki.netlabs.org Definition: BOOL APIENTRY GpiEnableYInversion(HPS hps, LONG lHeight); This function is exported by PMGPI.DLL as ordinal 723. You can use this function by loading it dynamically when needed, for example by the following code. (The code assumes that the program uses other Gpi* functions so PMGPI.DLL is already attached to the process!) static BOOL APIENTRY (*fnGpiEnableYInversion)(HPS hps, LONG lHeight) = NULL; void GpiEnableYInversion(HPS hps, LONG lHeight) { HMODULE hmod; int rc; if (fnGpiEnableYInversion) fnGpiEnableYInversion(hps, lHeight); else { // Interesting, it doesn't work with DosQueryModuleHandle(), even // though it returns the very same handle. // [ rc = DosQueryModuleHandle("PMGPI", &hmod); ] // I have to load and free the module instead... rc = DosLoadModule(NULL, 0, "PMGPI", &hmod); if (rc!=NO_ERROR) return; DosQueryProcAddr(hmod, 723, NULL, (PFN *)&fnGpiEnableYInversion); DosFreeModule(hmod); if (fnGpiEnableYInversion) fnGpiEnableYInversion(hps, lHeight); } } Or you can tell the linker to import it, by adding something like this to your *.def file: IMPORTS GpiEnableYInversion = PMGPI.723 Call the function with lHeight = height - 1; GpiEnableYInversion(hps, lHeight); Notes: I think it was introduced with the Open32 API (previously called DAPIE or DAX). It's purpose is to ease the porting of Windows applications to OS/2. Using this API for a given Presentation Space handle (HPS), all the Gpi functions will be inverted using the given lHeight value. Please note that not only the coordinates will be top-left based, but the blitting and handling of bitmaps will also be inverted. For example, using the GpiDrawBits() API expects a pointer to a pixel array, which is bottom-up by default. Once this call is used on the target Presentation Space, you'll have to have the pixels top-up way in your buffer if you want to have your image to be shown correctly. The current setting of Y-Inversion can be queried with the GpiQueryYInversion() API. It seems the aptl[] parameter of GpiBitBlt does not get inverted! However, the bitmaps themselves do! The output of GPIPartialArc gets mirrored across the Y-axis - the rotational direction changes! |
|
||
ArcaOS 5.1.1 что нового? - PNG иконкиТеперь PNG иконки на рабочем столе (вместо древних .ico 1994-го года) |
![]()
ACPI для OS/2eCo Software приступила к разработке драйвера ACPI в 2005-ом году |
// надо на ENG!!
![]()
Купить программу OS/2:
LIP пакет - Пакет русификации ArcaOS / eComStation,
|
Каждая конференция влияет на будущее OS/2. Люди готовили доклады несколько месяцев, потратили деньги на поездку в другой город или другую страну. Конференция даёт импульс сообществу на несколько месяцев вперёд. Результаты встречи обсуждаются в сообществе еще несколько недель. |
Warpstock Europe 2017
Интервью с Yuri Dario (Италия)
О чем еще говорили на конференции 2017 года? |