liberscribble/src/test.c File Reference

#include "scb.h"

Go to the source code of this file.

Defines

#define TRACE(x, args...)   fprintf(stderr, "(SCB_TEST)" __FILE__ ":%d,%s() " x "\n", __LINE__, __FUNCTION__ , ##args)

Functions

void testDoc ()
int main (int argc, char *argv[])


Define Documentation

#define TRACE ( x,
args...   )     fprintf(stderr, "(SCB_TEST)" __FILE__ ":%d,%s() " x "\n", __LINE__, __FUNCTION__ , ##args)

Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.

Definition at line 25 of file test.c.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 68 of file test.c.

00069 {
00070     testDoc();
00071     return 0;
00072 }

Here is the call graph for this function:

void testDoc (  ) 

Definition at line 34 of file test.c.

00035 {
00036     // doc
00037     ScbDocPtr doc = scb_doc_new();
00038     if (NULL == doc)
00039     {
00040         TRACE("Could not construct a scribble document!");
00041         return;
00042     }
00043 
00044     // page list
00045     ScbPagesPtr pages = scb_doc_get_pages(doc);
00046 
00047     // add some pages
00048     {
00049         ScbPageId id;
00050         ScbPagePtr page = NULL;
00051         int i = 0; 
00052         for(; i < 5; ++i)
00053         {
00054             scb_page_id_from_int(&id, i);
00055             page = scb_page_new(&id);
00056             scb_pages_add_page(pages, page);
00057         }
00058         scb_pages_dump(pages);
00059     }
00060 
00061     scb_doc_free(doc);
00062 }

Here is the call graph for this function:


Generated on Sun Dec 14 17:15:12 2008 by  doxygen 1.5.6