summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-04-19 19:38:20 -0400
committerBehdad Esfahbod <behdad@behdad.org>2007-04-20 00:52:01 -0400
commitfb2c0daa09af083278024c3da6f7e9e3f851984f (patch)
treea452fa3f80d87c34d3d90c9c377132378735df55 /boilerplate
parent01760286b388870e5bebf3851b4bef1350d89852 (diff)
[boilerplate] Rename test-beos to boilerplate-beos
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/Makefile.am3
-rw-r--r--boilerplate/cairo-boilerplate-beos-private.h34
-rw-r--r--boilerplate/cairo-boilerplate-beos.cpp (renamed from boilerplate/cairo-test-beos.cpp)20
-rw-r--r--boilerplate/cairo-boilerplate.c8
-rw-r--r--boilerplate/cairo-test-beos.h34
5 files changed, 50 insertions, 49 deletions
diff --git a/boilerplate/Makefile.am b/boilerplate/Makefile.am
index f097d9e6..09d1f1f2 100644
--- a/boilerplate/Makefile.am
+++ b/boilerplate/Makefile.am
@@ -13,7 +13,8 @@ libcairoboilerplate_la_SOURCES += cairo-boilerplate-quartz-private.h
endif
if CAIRO_HAS_BEOS_SURFACE
-libcairoboilerplate_la_SOURCES += cairo-test-beos.cpp cairo-test-beos.h
+libcairoboilerplate_la_SOURCES += cairo-boilerplate-beos.cpp
+libcairoboilerplate_la_SOURCES += cairo-boilerplate-beos-private.h
# BeOS system headers trigger this warning
libcairoboilerplate_la_CXXFLAGS = -Wno-multichar
endif
diff --git a/boilerplate/cairo-boilerplate-beos-private.h b/boilerplate/cairo-boilerplate-beos-private.h
new file mode 100644
index 00000000..b572353b
--- /dev/null
+++ b/boilerplate/cairo-boilerplate-beos-private.h
@@ -0,0 +1,34 @@
+#ifndef _CAIRO_BOILERPLATE_BEOS_PRIVATE_H_
+#define _CAIRO_BOILERPLATE_BEOS_PRIVATE_H_
+
+/* Two functions: One for a real window, one for a bitmap */
+
+#include <cairo.h>
+
+CAIRO_BEGIN_DECLS
+
+extern cairo_surface_t *
+_cairo_boilerplate_beos_create_surface (const char *name,
+ cairo_content_t content,
+ int width,
+ int height,
+ cairo_boilerplate_mode_t mode,
+ void **closure);
+
+extern void
+_cairo_boilerplate_beos_cleanup (void* closure);
+
+extern cairo_surface_t *
+_cairo_boilerplate_beos_create_surface_for_bitmap (const char *name,
+ cairo_content_t content,
+ int width,
+ int height,
+ cairo_boilerplate_mode_t mode,
+ void **closure);
+
+extern void
+_cairo_boilerplate_beos_cleanup_bitmap (void* closure);
+
+CAIRO_END_DECLS
+
+#endif
diff --git a/boilerplate/cairo-test-beos.cpp b/boilerplate/cairo-boilerplate-beos.cpp
index 78831e8e..2ebe2979 100644
--- a/boilerplate/cairo-test-beos.cpp
+++ b/boilerplate/cairo-boilerplate-beos.cpp
@@ -54,7 +54,7 @@ extern "C" {
#include "cairo-boilerplate.h"
}
-#include "cairo-test-beos.h"
+#include "cairo-boilerplate-beos-private.h"
#include "cairo-beos.h"
static int cairo_beos_boilerplate_log(const char* format, ...) {
@@ -174,7 +174,7 @@ AppRunner::~AppRunner()
// Make sure that the BApplication is initialized
static AppRunner sAppRunner;
-struct beos_test_closure
+struct beos_boilerplate_closure
{
BView* view;
BBitmap* bitmap;
@@ -183,7 +183,7 @@ struct beos_test_closure
// Test a real window
cairo_surface_t *
-create_beos_surface (const char *name,
+_cairo_boilerplate_beos_create_surface (const char *name,
cairo_content_t content,
int width,
int height,
@@ -195,7 +195,7 @@ create_beos_surface (const char *name,
BRect rect(0.0, 0.0, right, bottom);
CairoTestWindow* wnd = new CairoTestWindow(rect, name);
- beos_test_closure* bclosure = new beos_test_closure;
+ beos_boilerplate_closure* bclosure = new beos_boilerplate_closure;
bclosure->view = wnd->View();
bclosure->bitmap = NULL;
bclosure->window = wnd;
@@ -206,9 +206,9 @@ create_beos_surface (const char *name,
}
void
-cleanup_beos (void* closure)
+_cairo_boilerplate_beos_cleanup (void* closure)
{
- beos_test_closure* bclosure = reinterpret_cast<beos_test_closure*>(closure);
+ beos_boilerplate_closure* bclosure = reinterpret_cast<beos_boilerplate_closure*>(closure);
bclosure->window->Lock();
bclosure->window->Quit();
@@ -218,7 +218,7 @@ cleanup_beos (void* closure)
// Test a bitmap
cairo_surface_t *
-create_beos_bitmap_surface (const char *name,
+_cairo_boilerplate_beos_create_surface_for_bitmap (const char *name,
cairo_content_t content,
int width,
int height,
@@ -232,7 +232,7 @@ create_beos_bitmap_surface (const char *name,
BView* view = new BView(rect, "Cairo test view", B_FOLLOW_ALL_SIDES, 0);
bmp->AddChild(view);
- beos_test_closure* bclosure = new beos_test_closure;
+ beos_boilerplate_closure* bclosure = new beos_boilerplate_closure;
bclosure->view = view;
bclosure->bitmap = bmp;
bclosure->window = NULL;
@@ -242,9 +242,9 @@ create_beos_bitmap_surface (const char *name,
}
void
-cleanup_beos_bitmap (void* closure)
+_cairo_boilerplate_beos_cleanup_bitmap (void* closure)
{
- beos_test_closure* bclosure = reinterpret_cast<beos_test_closure*>(closure);
+ beos_boilerplate_closure* bclosure = reinterpret_cast<beos_boilerplate_closure*>(closure);
bclosure->bitmap->RemoveChild(bclosure->view);
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 79912b35..76c70738 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -1025,7 +1025,7 @@ cleanup_xlib (void *closure)
#if CAIRO_HAS_BEOS_SURFACE
/* BeOS test functions are external as they need to be C++ */
-#include "cairo-test-beos.h"
+#include "cairo-boilerplate-beos-private.h"
#endif
#if CAIRO_HAS_DIRECTFB_SURFACE
@@ -1504,11 +1504,11 @@ static cairo_boilerplate_target_t targets[] =
* is related to the fact that it doesn't use premultiplied alpha...
* Just ignore the small difference. */
{ "beos", CAIRO_SURFACE_TYPE_BEOS, CAIRO_CONTENT_COLOR, 1,
- create_beos_surface, cairo_surface_write_to_png, cleanup_beos},
+ _cairo_boilerplate_beos_create_surface, cairo_surface_write_to_png, _cairo_boilerplate_beos_cleanup},
{ "beos-bitmap", CAIRO_SURFACE_TYPE_BEOS, CAIRO_CONTENT_COLOR, 1,
- create_beos_bitmap_surface, cairo_surface_write_to_png, cleanup_beos_bitmap},
+ _cairo_boilerplate_beos_create_surface_for_bitmap, cairo_surface_write_to_png, _cairo_boilerplate_beos_cleanup_bitmap},
{ "beos-bitmap", CAIRO_SURFACE_TYPE_BEOS, CAIRO_CONTENT_COLOR_ALPHA, 1,
- create_beos_bitmap_surface, cairo_surface_write_to_png, cleanup_beos_bitmap},
+ _cairo_boilerplate_beos_create_surface_for_bitmap, cairo_surface_write_to_png, _cairo_boilerplate_beos_cleanup_bitmap},
#endif
#if CAIRO_HAS_DIRECTFB_SURFACE
diff --git a/boilerplate/cairo-test-beos.h b/boilerplate/cairo-test-beos.h
deleted file mode 100644
index 1e562cc3..00000000
--- a/boilerplate/cairo-test-beos.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef CAIRO_TEST_BEOS_H_
-#define CAIRO_TEST_BEOS_H_
-
-/* Two functions: One for a real window, one for a bitmap */
-
-#include <cairo.h>
-
-CAIRO_BEGIN_DECLS
-
-extern cairo_surface_t *
-create_beos_surface (const char *name,
- cairo_content_t content,
- int width,
- int height,
- cairo_boilerplate_mode_t mode,
- void **closure);
-
-extern void
-cleanup_beos (void* closure);
-
-extern cairo_surface_t *
-create_beos_bitmap_surface (const char *name,
- cairo_content_t content,
- int width,
- int height,
- cairo_boilerplate_mode_t mode,
- void **closure);
-
-extern void
-cleanup_beos_bitmap (void* closure);
-
-CAIRO_END_DECLS
-
-#endif