Bug 94569: Move xlib & xprint over to xxlibrgb* api. Patch by gisburn, I'm

just checking it in for him.  a=asa, r=jag, r=Tomi.Leppikangas@oulu.fi,
r=cls (Makefile changes), sr=kin
This commit is contained in:
rjesup%wgate.com 2006-01-11 21:28:23 +00:00
parent d3170d74de
commit 879de623af

View File

@ -24,6 +24,7 @@
#include "nsScreenXlib.h"
#include "xlibrgb.h"
#include <stdlib.h>
nsScreenXlib :: nsScreenXlib ( )
{
@ -48,10 +49,14 @@ NS_IMPL_ISUPPORTS1(nsScreenXlib, nsIScreen)
NS_IMETHODIMP
nsScreenXlib :: GetRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth, PRInt32 *outHeight)
{
XlibRgbHandle *xrh;
if (!(xrh = xxlib_find_handle(XXLIBRGB_DEFAULT_HANDLE)))
abort();
*outTop = 0;
*outLeft = 0;
*outWidth = DisplayWidth(xlib_rgb_get_display(), 0);
*outHeight = DisplayHeight(xlib_rgb_get_display(), 0);
*outWidth = XDisplayWidth(xxlib_rgb_get_display(xrh), 0);
*outHeight = XDisplayHeight(xxlib_rgb_get_display(xrh), 0);
return NS_OK;
@ -61,10 +66,14 @@ nsScreenXlib :: GetRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth, PR
NS_IMETHODIMP
nsScreenXlib :: GetAvailRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth, PRInt32 *outHeight)
{
XlibRgbHandle *xrh;
if (!(xrh = xxlib_find_handle(XXLIBRGB_DEFAULT_HANDLE)))
abort();
*outTop = 0;
*outLeft = 0;
*outWidth = DisplayWidth(xlib_rgb_get_display(), 0);
*outHeight = DisplayHeight(xlib_rgb_get_display(), 0);
*outWidth = XDisplayWidth(xxlib_rgb_get_display(xrh), 0);
*outHeight = XDisplayHeight(xxlib_rgb_get_display(xrh), 0);
return NS_OK;
@ -74,7 +83,11 @@ nsScreenXlib :: GetAvailRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidt
NS_IMETHODIMP
nsScreenXlib :: GetPixelDepth(PRInt32 *aPixelDepth)
{
*aPixelDepth = xlib_rgb_get_depth();
XlibRgbHandle *xrh;
if (!(xrh = xxlib_find_handle(XXLIBRGB_DEFAULT_HANDLE)))
abort();
*aPixelDepth = xxlib_rgb_get_depth(xrh);
return NS_OK;