From bd4f79646f623e929e6aa22bea028952b515aeef Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Jan 2023 10:30:10 -0500 Subject: Add general string hint interface This replaces the window title and class name APIs with a more general one that can be easily extended to other things, like icon names, more detailed application hints, and so on. --- test/test_view.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/test_view.c') diff --git a/test/test_view.c b/test/test_view.c index 7f1a112..a6af9f2 100644 --- a/test/test_view.c +++ b/test/test_view.c @@ -67,8 +67,8 @@ main(int argc, char** argv) // Set up view test.view = puglNewView(test.world); - puglSetClassName(test.world, "PuglTest"); - puglSetWindowTitle(test.view, "Pugl View Test"); + puglSetWorldString(test.world, PUGL_CLASS_NAME, "PuglTest"); + puglSetViewString(test.view, PUGL_WINDOW_TITLE, "Pugl View Test"); puglSetBackend(test.view, puglStubBackend()); puglSetHandle(test.view, &test); puglSetEventFunc(test.view, onEvent); @@ -76,9 +76,10 @@ main(int argc, char** argv) puglSetPosition(test.view, 384, 640); // Check basic accessors - assert(!strcmp(puglGetClassName(test.world), "PuglTest")); - assert(!strcmp(puglGetWindowTitle(test.view), "Pugl View Test")); assert(puglGetBackend(test.view) == puglStubBackend()); + assert(!strcmp(puglGetWorldString(test.world, PUGL_CLASS_NAME), "PuglTest")); + assert( + !strcmp(puglGetViewString(test.view, PUGL_WINDOW_TITLE), "Pugl View Test")); // Create and show window assert(!puglRealize(test.view)); -- cgit v1.2.1