Initial checkin of Qt gfx files. Still pretty raw in a lot of places.

This commit is contained in:
shawnp%earthling.net 1999-08-12 01:51:22 +00:00
Родитель 7e90bacdd2
Коммит 1379bc6603
2 изменённых файлов: 138 добавлений и 0 удалений

56
gfx/src/qt/Makefile.in Normal file
Просмотреть файл

@ -0,0 +1,56 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
MODULE=raptor
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
LIBRARY_NAME = gfx_qt
REQUIRES=util img xpcom raptor netlib ps
#DEFINES += -D_IMPL_NS_GFXONXP
DEFINES += -D_IMPL_NS_GFXNONXP
CXXFLAGS += $(TK_CFLAGS)
INCLUDES += $(TK_CFLAGS) -I$(srcdir)/..
CPPSRCS = \
nsDeviceContextQT.cpp \
nsDeviceContextSpecFactoryQT.cpp \
nsDeviceContextSpecQT.cpp \
nsDrawingSurfaceQT.cpp \
nsFontMetricsQT.cpp \
nsGfxFactoryQT.cpp \
nsImageQT.cpp \
nsRegionQT.cpp \
nsRenderingContextQT.cpp \
$(NULL)
# nsGraphicsStateQT.cpp \
#CSRCS = \
# nsPrintdQT.c
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,82 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIDrawingSurfaceQT_h___
#define nsIDrawingSurfaceQT_h___
#include "nsIDrawingSurface.h"
class QPainter;
class QPixmap;
// windows specific drawing surface method set
#define NS_IDRAWING_SURFACE_QT_IID \
{ 0x1ed958b0, 0xcab6, 0x11d2, \
{ 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
class nsIDrawingSurfaceQT : public nsISupports
{
public:
/**
* Initialize a drawing surface using a windows DC.
* aDC is "owned" by the drawing surface until the drawing
* surface is destroyed.
* @param aDC HDC to initialize drawing surface with
* @return error status
**/
NS_IMETHOD Init(QPixmap * aPixmap, QPainter * aGC) = 0;
/**
* Initialize an offscreen drawing surface using a
* windows DC. aDC is not "owned" by this drawing surface, instead
* it is used to create a drawing surface compatible
* with aDC. if width or height are less than zero, aDC will
* be created with no offscreen bitmap installed.
* @param aDC HDC to initialize drawing surface with
* @param aWidth width of drawing surface
* @param aHeight height of drawing surface
* @param aFlags flags used to control type of drawing
* surface created
* @return error status
**/
NS_IMETHOD Init(QPainter * aGC,
PRUint32 aWidth,
PRUint32 aHeight,
PRUint32 aFlags) = 0;
#if 0
/**
* Get a windows DC that represents the drawing surface.
* GetDC() must be paired with ReleaseDC(). Getting a DC
* and Lock()ing are mutually exclusive operations.
* @param aDC out parameter for HDC
* @return error status
**/
NS_IMETHOD GetGC(QPainter * aGC) = 0;
/**
* Release a windows DC obtained by GetDC().
* ReleaseDC() must be preceded by a call to ReleaseDC().
* @return error status
**/
NS_IMETHOD ReleaseGC(void) = 0;
#endif
};
#endif // nsIDrawingSurfaceQT_h___