mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-25 16:30:09 +01:00
Drop OS/2 support
OS/2 support was last built in Cairo 1.12, which was released 10 years ago. Additionally, OS/2 is not supported by Meson.
This commit is contained in:
parent
1fa3b10cce
commit
64db153c43
17 changed files with 3 additions and 1712 deletions
11
README
11
README
|
|
@ -7,7 +7,7 @@ Cairo is a 2D graphics library with support for multiple output
|
|||
devices. Currently supported output targets include the X Window
|
||||
System (via both Xlib and XCB), quartz, win32, and image buffers,
|
||||
as well as PDF, PostScript, and SVG file output. Experimental backends
|
||||
include OpenGL, OS/2, and DirectFB.
|
||||
include OpenGL and DirectFB.
|
||||
|
||||
Cairo is designed to produce consistent output on all output media
|
||||
while taking advantage of display hardware acceleration when available
|
||||
|
|
@ -167,15 +167,6 @@ Font backends (required to have at least one)
|
|||
7.1 or later, including the free Microsoft Visual Studio
|
||||
Express editions, produce correct code.
|
||||
|
||||
Experimental surface backends
|
||||
-----------------------------
|
||||
os2 backend
|
||||
-----------
|
||||
Cairo should run on any recent version of OS/2 or eComStation, but it
|
||||
requires a font backend. See the freetype dependency list. Ready to use
|
||||
packages and developer dependencies are available at Netlabs:
|
||||
ftp://ftp.netlabs.org/pub/cairo
|
||||
|
||||
|
||||
Compiling
|
||||
=========
|
||||
|
|
|
|||
|
|
@ -117,16 +117,6 @@ enabled_cairo_boilerplate_private += $(cairo_boilerplate_win32_font_private)
|
|||
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_win32_font_sources)
|
||||
endif
|
||||
|
||||
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_os2_headers)
|
||||
all_cairo_boilerplate_headers += $(cairo_boilerplate_os2_headers)
|
||||
all_cairo_boilerplate_private += $(cairo_boilerplate_os2_private)
|
||||
all_cairo_boilerplate_sources += $(cairo_boilerplate_os2_sources)
|
||||
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
|
||||
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_os2_headers)
|
||||
enabled_cairo_boilerplate_private += $(cairo_boilerplate_os2_private)
|
||||
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_os2_sources)
|
||||
endif
|
||||
|
||||
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_drm_headers)
|
||||
all_cairo_boilerplate_headers += $(cairo_boilerplate_drm_headers)
|
||||
all_cairo_boilerplate_private += $(cairo_boilerplate_drm_private)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ CAIRO_HAS_QUARTZ_FONT=0
|
|||
CAIRO_HAS_QUARTZ_IMAGE_SURFACE=0
|
||||
CAIRO_HAS_WIN32_SURFACE=1
|
||||
CAIRO_HAS_WIN32_FONT=1
|
||||
CAIRO_HAS_OS2_SURFACE=0
|
||||
CAIRO_HAS_DRM_SURFACE=0
|
||||
CAIRO_HAS_GALLIUM_SURFACE=0
|
||||
CAIRO_HAS_PNG_FUNCTIONS=1
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ endif
|
|||
ifeq ($(CAIRO_HAS_WIN32_FONT),1)
|
||||
@echo "#define CAIRO_HAS_WIN32_FONT 1" >> $(top_srcdir)/src/cairo-features.h
|
||||
endif
|
||||
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
|
||||
@echo "#define CAIRO_HAS_OS2_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
||||
endif
|
||||
ifeq ($(CAIRO_HAS_DRM_SURFACE),1)
|
||||
@echo "#define CAIRO_HAS_DRM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -371,7 +371,6 @@ AC_DEFUN([CAIRO_REPORT],
|
|||
echo " Quartz-image: $use_quartz_image"
|
||||
echo " XCB: $use_xcb"
|
||||
echo " Win32: $use_win32"
|
||||
echo " OS2: $use_os2"
|
||||
echo " CairoScript: $use_script"
|
||||
echo " PostScript: $use_ps"
|
||||
echo " PDF: $use_pdf"
|
||||
|
|
|
|||
13
configure.ac
13
configure.ac
|
|
@ -239,19 +239,6 @@ AM_CONDITIONAL(CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE, test "x$test_win32_printin
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_ENABLE_SURFACE_BACKEND(os2, OS/2, no, [
|
||||
case "$host" in
|
||||
*-*-os2*)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
use_os2="no (requires an OS/2 platform)"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_ENABLE_SURFACE_BACKEND(drm, DRM, no, [
|
||||
dnl Keep in sync with meson.build!
|
||||
drm_REQUIRES="libudev >= 136, libdrm >= 2.4"
|
||||
|
|
|
|||
|
|
@ -990,7 +990,6 @@ summary({
|
|||
'Quartz-image': feature_conf.get('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 0) == 1,
|
||||
'XCB': feature_conf.get('CAIRO_HAS_XCB_SURFACE', 0) == 1,
|
||||
'Win32': feature_conf.get('CAIRO_HAS_WIN32_SURFACE', 0) == 1,
|
||||
'OS2': false,
|
||||
'CairoScript': feature_conf.get('CAIRO_HAS_SCRIPT_SURFACE', 0) == 1,
|
||||
'PostScript': feature_conf.get('CAIRO_HAS_PS_SURFACE', 0) == 1,
|
||||
'PDF': feature_conf.get('CAIRO_HAS_PDF_SURFACE', 0) == 1,
|
||||
|
|
|
|||
|
|
@ -36,10 +36,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__OS2__)
|
||||
#define INCL_BASE
|
||||
#include <os2.h>
|
||||
#elif defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#elif defined(_POSIX_PRIORITY_SCHEDULING)
|
||||
|
|
@ -86,9 +83,7 @@ cairo_perf_yield (void)
|
|||
{
|
||||
/* try to deactivate this thread until the scheduler calls it again */
|
||||
|
||||
#if defined(__OS2__)
|
||||
DosSleep (0);
|
||||
#elif defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
SleepEx(0, TRUE);
|
||||
#elif defined(_POSIX_PRIORITY_SCHEDULING)
|
||||
sched_yield ();
|
||||
|
|
|
|||
|
|
@ -361,10 +361,6 @@ cairo_win32_font_sources = \
|
|||
win32/cairo-win32-font.c \
|
||||
$(NULL)
|
||||
|
||||
cairo_os2_headers = cairo-os2.h
|
||||
cairo_os2_private = cairo-os2-private.h
|
||||
cairo_os2_sources = cairo-os2-surface.c
|
||||
|
||||
cairo_gl_headers = cairo-gl.h
|
||||
cairo_gl_private = cairo-gl-private.h \
|
||||
cairo-gl-dispatch-private.h \
|
||||
|
|
|
|||
|
|
@ -159,20 +159,6 @@ ifeq ($(CAIRO_HAS_WIN32_FONT),1)
|
|||
enabled_cairo_pkgconf += cairo-win32-font.pc
|
||||
endif
|
||||
|
||||
unsupported_cairo_headers += $(cairo_os2_headers)
|
||||
all_cairo_headers += $(cairo_os2_headers)
|
||||
all_cairo_private += $(cairo_os2_private)
|
||||
all_cairo_sources += $(cairo_os2_sources)
|
||||
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
|
||||
enabled_cairo_headers += $(cairo_os2_headers)
|
||||
enabled_cairo_private += $(cairo_os2_private)
|
||||
enabled_cairo_sources += $(cairo_os2_sources)
|
||||
endif
|
||||
all_cairo_pkgconf += cairo-os2.pc
|
||||
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
|
||||
enabled_cairo_pkgconf += cairo-os2.pc
|
||||
endif
|
||||
|
||||
unsupported_cairo_headers += $(cairo_drm_headers)
|
||||
all_cairo_headers += $(cairo_drm_headers)
|
||||
all_cairo_private += $(cairo_drm_private)
|
||||
|
|
|
|||
|
|
@ -195,21 +195,6 @@
|
|||
# define CAIRO_MUTEX_IMPL_FINI(mutex) DeleteCriticalSection (&(mutex))
|
||||
# define CAIRO_MUTEX_IMPL_NIL_INITIALIZER { NULL, 0, 0, NULL, NULL, 0 }
|
||||
|
||||
#elif defined __OS2__ /******************************************************/
|
||||
|
||||
# define INCL_BASE
|
||||
# define INCL_PM
|
||||
# include <os2.h>
|
||||
|
||||
typedef HMTX cairo_mutex_impl_t;
|
||||
|
||||
# define CAIRO_MUTEX_IMPL_OS2 1
|
||||
# define CAIRO_MUTEX_IMPL_LOCK(mutex) DosRequestMutexSem(mutex, SEM_INDEFINITE_WAIT)
|
||||
# define CAIRO_MUTEX_IMPL_UNLOCK(mutex) DosReleaseMutexSem(mutex)
|
||||
# define CAIRO_MUTEX_IMPL_INIT(mutex) DosCreateMutexSem (NULL, &(mutex), 0L, FALSE)
|
||||
# define CAIRO_MUTEX_IMPL_FINI(mutex) DosCloseMutexSem (mutex)
|
||||
# define CAIRO_MUTEX_IMPL_NIL_INITIALIZER 0
|
||||
|
||||
#elif CAIRO_HAS_PTHREAD /* and finally if there are no native mutexes ********/
|
||||
|
||||
# include <pthread.h>
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
/* vim: set sw=4 sts=4 et cin: */
|
||||
/* cairo - a vector graphics library with display and print output
|
||||
*
|
||||
* Copyright (c) 2005-2006 netlabs.org
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it either under the terms of the GNU Lesser General Public
|
||||
* License version 2.1 as published by the Free Software Foundation
|
||||
* (the "LGPL") or, at your option, under the terms of the Mozilla
|
||||
* Public License Version 1.1 (the "MPL"). If you do not alter this
|
||||
* notice, a recipient may use your version of this file under either
|
||||
* the MPL or the LGPL.
|
||||
*
|
||||
* You should have received a copy of the LGPL along with this library
|
||||
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
|
||||
* You should have received a copy of the MPL along with this library
|
||||
* in the file COPYING-MPL-1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
|
||||
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
|
||||
* the specific language governing rights and limitations.
|
||||
*
|
||||
* The Original Code is the cairo graphics library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Doodle <doodle@scenergy.dfmk.hu>
|
||||
*
|
||||
* Contributor(s):
|
||||
* Peter Weilbacher <mozilla@Weilbacher.org>
|
||||
*/
|
||||
|
||||
#ifndef CAIRO_OS2_PRIVATE_H
|
||||
#define CAIRO_OS2_PRIVATE_H
|
||||
|
||||
#include "cairo-os2.h"
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_os2_surface
|
||||
{
|
||||
cairo_surface_t base;
|
||||
|
||||
/* Mutex semaphore to protect private fields from concurrent access */
|
||||
HMTX hmtx_use_private_fields;
|
||||
/* Private fields: */
|
||||
HPS hps_client_window;
|
||||
HWND hwnd_client_window;
|
||||
BITMAPINFO2 bitmap_info;
|
||||
unsigned char *pixels;
|
||||
cairo_image_surface_t *image_surface;
|
||||
int pixel_array_lend_count;
|
||||
HEV hev_pixel_array_came_back;
|
||||
|
||||
RECTL rcl_dirty_area;
|
||||
cairo_bool_t dirty_area_present;
|
||||
|
||||
/* General flags: */
|
||||
cairo_bool_t blit_as_changes;
|
||||
cairo_bool_t use_24bpp;
|
||||
} cairo_os2_surface_t;
|
||||
|
||||
#endif /* CAIRO_OS2_PRIVATE_H */
|
||||
File diff suppressed because it is too large
Load diff
110
src/cairo-os2.h
110
src/cairo-os2.h
|
|
@ -1,110 +0,0 @@
|
|||
/* vim: set sw=4 sts=4 et cin: */
|
||||
/* cairo - a vector graphics library with display and print output
|
||||
*
|
||||
* Copyright (c) 2005-2006 netlabs.org
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it either under the terms of the GNU Lesser General Public
|
||||
* License version 2.1 as published by the Free Software Foundation
|
||||
* (the "LGPL") or, at your option, under the terms of the Mozilla
|
||||
* Public License Version 1.1 (the "MPL"). If you do not alter this
|
||||
* notice, a recipient may use your version of this file under either
|
||||
* the MPL or the LGPL.
|
||||
*
|
||||
* You should have received a copy of the LGPL along with this library
|
||||
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
|
||||
* You should have received a copy of the MPL along with this library
|
||||
* in the file COPYING-MPL-1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
|
||||
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
|
||||
* the specific language governing rights and limitations.
|
||||
*
|
||||
* The Original Code is the cairo graphics library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Doodle <doodle@scenergy.dfmk.hu>
|
||||
*
|
||||
* Contributor(s):
|
||||
* Peter Weilbacher <mozilla@Weilbacher.org>
|
||||
* Rich Walsh <dragtext@e-vertise.com>
|
||||
*/
|
||||
|
||||
#ifndef _CAIRO_OS2_H_
|
||||
#define _CAIRO_OS2_H_
|
||||
|
||||
#define INCL_DOS
|
||||
#define INCL_DOSSEMAPHORES
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_WIN
|
||||
#define INCL_GPI
|
||||
|
||||
#include "cairo.h"
|
||||
|
||||
#include <os2.h>
|
||||
|
||||
CAIRO_BEGIN_DECLS
|
||||
|
||||
/* The OS/2 Specific Cairo API */
|
||||
|
||||
cairo_public void
|
||||
cairo_os2_init (void);
|
||||
|
||||
cairo_public void
|
||||
cairo_os2_fini (void);
|
||||
|
||||
#if CAIRO_HAS_OS2_SURFACE
|
||||
|
||||
cairo_public cairo_surface_t *
|
||||
cairo_os2_surface_create (HPS hps_client_window,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
cairo_public cairo_surface_t *
|
||||
cairo_os2_surface_create_for_window (HWND hwnd_client_window,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
cairo_public void
|
||||
cairo_os2_surface_set_hwnd (cairo_surface_t *surface,
|
||||
HWND hwnd_client_window);
|
||||
|
||||
cairo_public int
|
||||
cairo_os2_surface_set_size (cairo_surface_t *surface,
|
||||
int new_width,
|
||||
int new_height,
|
||||
int timeout);
|
||||
|
||||
cairo_public void
|
||||
cairo_os2_surface_refresh_window (cairo_surface_t *surface,
|
||||
HPS hps_begin_paint,
|
||||
PRECTL prcl_begin_paint_rect);
|
||||
|
||||
cairo_public void
|
||||
cairo_os2_surface_set_manual_window_refresh (cairo_surface_t *surface,
|
||||
cairo_bool_t manual_refresh);
|
||||
|
||||
cairo_public cairo_bool_t
|
||||
cairo_os2_surface_get_manual_window_refresh (cairo_surface_t *surface);
|
||||
|
||||
cairo_public cairo_status_t
|
||||
cairo_os2_surface_get_hps (cairo_surface_t *surface,
|
||||
HPS *hps);
|
||||
|
||||
cairo_public cairo_status_t
|
||||
cairo_os2_surface_set_hps (cairo_surface_t *surface,
|
||||
HPS hps);
|
||||
|
||||
#else /* CAIRO_HAS_OS2_SURFACE */
|
||||
# error Cairo was not compiled with support for the OS/2 backend
|
||||
#endif /* CAIRO_HAS_OS2_SURFACE */
|
||||
|
||||
CAIRO_END_DECLS
|
||||
|
||||
#endif /* _CAIRO_OS2_H_ */
|
||||
|
|
@ -61,34 +61,6 @@ _cairo_time_get (void)
|
|||
return mach_absolute_time ();
|
||||
}
|
||||
|
||||
#elif defined(__OS2__)
|
||||
#define INCL_BASE
|
||||
#include <os2.h>
|
||||
|
||||
static cairo_always_inline double
|
||||
_cairo_time_1s (void)
|
||||
{
|
||||
ULONG freq;
|
||||
|
||||
DosTmrQueryFreq (&freq);
|
||||
|
||||
return freq;
|
||||
}
|
||||
|
||||
cairo_time_t
|
||||
_cairo_time_get (void)
|
||||
{
|
||||
QWORD t;
|
||||
cairo_int64_t r;
|
||||
|
||||
DosTmrQueryTime (&t);
|
||||
|
||||
r = _cairo_int64_lsl (_cairo_int32_to_int64 (t.ulHi), 32);
|
||||
r = _cairo_int64_add (r, _cairo_int32_to_int64 (t.ulLo));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
#elif _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
|
|
|||
|
|
@ -66,9 +66,6 @@
|
|||
#if CAIRO_HAS_GL_SURFACE
|
||||
#include <cairo-gl.h>
|
||||
#endif
|
||||
#if CAIRO_HAS_OS2_SURFACE
|
||||
#include <cairo-os2.h>
|
||||
#endif
|
||||
#if CAIRO_HAS_PDF_SURFACE
|
||||
#include <cairo-pdf.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@
|
|||
#if CAIRO_HAS_GL_SURFACE
|
||||
#include <cairo-gl.h>
|
||||
#endif
|
||||
#if CAIRO_HAS_OS2_SURFACE
|
||||
#include <cairo-os2.h>
|
||||
#endif
|
||||
#if CAIRO_HAS_PDF_SURFACE
|
||||
#include <cairo-pdf.h>
|
||||
#endif
|
||||
|
|
@ -61,12 +58,6 @@ preamble (cairo_test_context_t *ctx)
|
|||
cairo_gl_surface_swapbuffers (surface);
|
||||
#endif
|
||||
|
||||
#if CAIRO_HAS_OS2_SURFACE
|
||||
cairo_os2_surface_set_hwnd (surface, 0);
|
||||
cairo_os2_surface_set_size (surface, 0, 0, 0);
|
||||
cairo_os2_surface_set_manual_window_refresh (surface, FALSE);
|
||||
#endif
|
||||
|
||||
#if CAIRO_HAS_PDF_SURFACE
|
||||
cairo_pdf_surface_restrict_to_version (surface, CAIRO_PDF_VERSION_1_4);
|
||||
cairo_pdf_surface_set_size (surface, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue