JNIEXPORT void JNICALL Java_org_eclipse_wb_internal_ercp_eswt_EmbeddedScreenShotMaker_embeddedMakeShot(JNIEnv*, jclass, jint controlHandle, jint imageHandle) {
		UGL_Control *control = (UGL_Control*)controlHandle;
		UGL_DC *image = (UGL_DC*)imageHandle;
		//
		LOCK_DC(image);
		SendMessageW((HWND)control->hWnd, WM_PRINT, (WPARAM)image->hdc, PRF_CLIENT | PRF_NONCLIENT | PRF_ERASEBKGND | PRF_CHILDREN);
		UNLOCK_DC(image);
	}
Esempio n. 2
0
UINT	WINAPI
GetSystemPaletteEntries(HDC hDC,
	UINT uPaletteIndex, UINT uNumPaletteEntries, 
	LPPALETTEENTRY lpPaletteEntries)
{
	LPDC lpDC;
	HPALETTE hSystemPalette;
	LPPALETTE lpSystemPalette;
	UINT uNumSystemPaletteEntries;

	APISTR((LF_API, 
	"GetSystemPaletteEntries(HDC=%x,UINT=%x,UINT=%x,PALETTEENTRY *%x)\n",
		hDC, uPaletteIndex, uNumPaletteEntries, lpPaletteEntries));

	ASSERT_DC(lpDC, hDC, 0);

#ifdef TWIN_PALETTE
	if (!(hSystemPalette = (HPALETTE)
		DC_OUTPUT(LSD_GETSYSTEMPALETTE, lpDC, 0, 0))
	 || !(lpSystemPalette = LOCK_PALETTE(hSystemPalette)))
	{
		UNLOCK_DC(hDC);
		SetLastErrorEx(1, 0);
		APISTR((LF_APIRET, "SetPaletteEntries: returns UINT 0\n"));
		return (0);
	}

	uNumSystemPaletteEntries = GetPaletteEntries(hSystemPalette,
		uPaletteIndex, uNumPaletteEntries, lpPaletteEntries);
#endif

	UNLOCK_PALETTE(hSystemPalette);
	UNLOCK_DC(hDC);

	APISTR((LF_APIRET, "SetPaletteEntries: returns UINT %x\n",
		uNumSystemPaletteEntries));
	return (uNumSystemPaletteEntries);

}
Esempio n. 3
0
HPALETTE	WINAPI
CreateHalftonePalette(HDC hDC)
{
	HPALETTE hPalette = 0;
	LPDC lpDC;

	APISTR((LF_APISTUB,"CreateHalftonePalette(HDC=%x)\n", hDC));

	ASSERT_DC(lpDC, hDC, (HPALETTE) 0);

	UNLOCK_DC(hDC);

	return (hPalette);
}
Esempio n. 4
0
BOOL	WINAPI
UpdateColors(HDC hDC)
{
	LPDC lpDC;
	BOOL bUpdateColors;

	APISTR((LF_APICALL, "UpdateColors(HDC=%x)\n", hDC));

	ASSERT_DC(lpDC, hDC, FALSE);

	bUpdateColors = (BOOL) DC_OUTPUT(LSD_UPDATECOLORS, lpDC, 0, 0);

	UNLOCK_DC(hDC);

	APISTR((LF_APIRET, "UpdateColors: returns BOOL %d\n",bUpdateColors));
	return (bUpdateColors);
}
Esempio n. 5
0
UINT	WINAPI
GetSystemPaletteUse(HDC hDC)
{
	LPDC lpDC;
	UINT uSystemPaletteUse;

	APISTR((LF_APICALL, "GetSystemPaletteUse(HDC=%x)\n", hDC));

	ASSERT_DC(lpDC, hDC, SYSPAL_ERROR);

	uSystemPaletteUse = (UINT)
		DC_OUTPUT(LSD_SYSTEMPALETTEUSE, lpDC, SYSPAL_ERROR, FALSE);

	UNLOCK_DC(hDC);

	APISTR((LF_APIRET, "GetSystemPaletteUse: returns UINT %x\n", 
		uSystemPaletteUse));
	return (uSystemPaletteUse);

}
Esempio n. 6
0
HPALETTE	WINAPI
SelectPalette(HDC hDC, HPALETTE hPalette, BOOL bForceBackground)
{
	LPDC lpDC;
	HPALETTE hOldPalette;

	APISTR((LF_APICALL, "SelectPalette(HDC=%x,HPALETTE=%x,BOOL=%d)\n",
		hDC, hPalette, bForceBackground));

	ASSERT_DC(lpDC, hDC, (HPALETTE) 0);

	hOldPalette = (HPALETTE) DC_OUTPUT(LSD_SELECTPALETTE, lpDC, hPalette,
		bForceBackground);

	UNLOCK_DC(hDC);

	APISTR((LF_APIRET, "SelectPalette: returns HPALETTE %x\n",hOldPalette));
	return (hOldPalette);

}
Esempio n. 7
0
UINT	WINAPI
SetSystemPaletteUse(HDC hDC, UINT uSystemPaletteUse)
{
	LPDC lpDC;
	UINT uOldSystemPaletteUse;

	APISTR((LF_API, "SetSystemPaletteUse(HDC=%x,UINT=%d)\n",
		hDC, uSystemPaletteUse));

	ASSERT_DC(lpDC, hDC, SYSPAL_ERROR);

	uOldSystemPaletteUse = (UINT)
		DC_OUTPUT(LSD_SYSTEMPALETTEUSE, lpDC, uSystemPaletteUse, TRUE);

	UNLOCK_DC(hDC);

	APISTR((LF_APIRET, "SetSystemPaletteUse: returns UINT %x\n", 
		uOldSystemPaletteUse));
	return (uOldSystemPaletteUse);

}
Esempio n. 8
0
UINT	WINAPI
RealizePalette(HDC hDC)
{
	LPDC lpDC;
	UINT uNumRealizePalette;

	APISTR((LF_APICALL, "RealizePalette(HDC=%x)\n", hDC));

	ASSERT_DC(lpDC, hDC, GDI_ERROR);

#ifdef TWIN_PALETTE
	uNumRealizePalette = (UINT) DC_OUTPUT(LSD_REALIZEPALETTE, lpDC, 0, 0);
#else
	uNumRealizePalette = 20;
#endif

	UNLOCK_DC(hDC);

	APISTR((LF_APIRET, "RealizePalette: returns UINT %x\n",
		uNumRealizePalette));
	return (uNumRealizePalette);

}