Changeset 665 for libcaca/trunk
- Timestamp:
- Mar 22, 2006, 6:46:11 PM (15 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/cucul.c
r663 r665 38 38 * be called at the end of the program to free all allocated resources. 39 39 * 40 * If one of the desired canvas coordinates is zero, a default canvas size 41 * of 80x32 is used instead. 42 * 43 * \param width The desired canvas width 44 * \param height The desired canvas height 40 45 * \return 0 upon success, a non-zero value if an error occurs. 41 46 */ 42 cucul_t * cucul_init( void)47 cucul_t * cucul_init(unsigned int width, unsigned int height) 43 48 { 44 49 cucul_t *qq = malloc(sizeof(cucul_t)); … … 49 54 qq->bgcolor = CUCUL_COLOR_BLACK; 50 55 51 /* Initialise to a default size. 80x32 is arbitrary but matches AAlib's52 * default X11 window. When a graphic driver attaches to us, it can set53 * a different size. */54 56 qq->width = qq->width = 0; 55 57 qq->chars = NULL; 56 58 qq->attr = NULL; 57 59 qq->empty_line = qq->scratch_line = NULL; 58 _cucul_set_size(qq, 80, 32); 60 61 /* Initialise to a default size. 80x32 is arbitrary but matches AAlib's 62 * default X11 window. When a graphic driver attaches to us, it can set 63 * a different size. */ 64 if(width && height) 65 _cucul_set_size(qq, width, height); 66 else 67 _cucul_set_size(qq, 80, 32); 59 68 60 69 if(_cucul_init_bitmap()) … … 70 79 * 71 80 * This function sets the canvas width and height, in character cells. 81 * 82 * The contents of the canvas are preserved to the extent of the new 83 * canvas size. Newly allocated character cells at the right and/or at 84 * the bottom of the canvas are filled with spaces. 72 85 * 73 86 * It is an error to try to resize the canvas if an output driver has 74 87 * been attached to the canvas using caca_attach(). You need to remove 75 88 * the output driver using caca_detach() before you can change the 76 * canvas size again. 77 * 78 * However, the caca output driver can cause a canvas resize through 79 * user interaction. See the caca_event() documentation for more about 80 * this. 89 * canvas size again. However, the caca output driver can cause a canvas 90 * resize through user interaction. See the caca_event() documentation 91 * for more about this. 81 92 * 82 93 * \param width The desired canvas width -
libcaca/trunk/cucul/cucul.h
r658 r665 119 119 * 120 120 * @{ */ 121 cucul_t * cucul_init( void);121 cucul_t * cucul_init(unsigned int, unsigned int); 122 122 void cucul_set_size(cucul_t *, unsigned int, unsigned int); 123 123 unsigned int cucul_get_width(cucul_t *); -
libcaca/trunk/src/aafire.c
r653 r665 101 101 102 102 #ifdef LIBCACA 103 qq = cucul_init( );103 qq = cucul_init(80, 32); 104 104 if (!qq) 105 105 { -
libcaca/trunk/src/cacaball.c
r653 r665 54 54 double frameOffset80[360]; 55 55 56 qq = cucul_init( );56 qq = cucul_init(0, 0); 57 57 if(!qq) 58 58 return 1; -
libcaca/trunk/src/cacamoir.c
r653 r665 43 43 int i, x, y, frame = 0, pause = 0; 44 44 45 qq = cucul_init( );45 qq = cucul_init(0, 0); 46 46 if(!qq) 47 47 return 1; -
libcaca/trunk/src/cacaplas.c
r655 r665 46 46 int i, x, y, frame = 0, pause = 0; 47 47 48 qq = cucul_init( );48 qq = cucul_init(0, 0); 49 49 if(!qq) 50 50 return 1; -
libcaca/trunk/src/cacaview.c
r662 r665 89 89 90 90 /* Initialise libcucul */ 91 qq = cucul_init( );91 qq = cucul_init(0, 0); 92 92 if(!qq) 93 93 { -
libcaca/trunk/test/colors.c
r592 r665 27 27 int i, j; 28 28 29 qq = cucul_init( );29 qq = cucul_init(0, 0); 30 30 if(!qq) 31 31 return 1; -
libcaca/trunk/test/demo.c
r653 r665 46 46 int quit = 0; 47 47 48 qq = cucul_init( );48 qq = cucul_init(0, 0); 49 49 if(!qq) 50 50 return 1; -
libcaca/trunk/test/dithering.c
r527 r665 40 40 int x, y; 41 41 42 qq = cucul_init( );42 qq = cucul_init(0, 0); 43 43 kk = caca_attach(qq); 44 44 -
libcaca/trunk/test/event.c
r527 r665 31 31 int i, h, quit; 32 32 33 qq = cucul_init( );33 qq = cucul_init(0, 0); 34 34 if(!qq) 35 35 return 1; -
libcaca/trunk/test/export.c
r653 r665 67 67 } 68 68 69 qq = cucul_init( );69 qq = cucul_init(0, 0); 70 70 cucul_set_size(qq, WIDTH, HEIGHT); 71 71 -
libcaca/trunk/test/gamma.c
r661 r665 35 35 int x; 36 36 37 qq = cucul_init( );37 qq = cucul_init(0, 0); 38 38 kk = caca_attach(qq); 39 39 -
libcaca/trunk/test/hsv.c
r653 r665 35 35 int x, y; 36 36 37 qq = cucul_init( );37 qq = cucul_init(0, 0); 38 38 kk = caca_attach(qq); 39 39 -
libcaca/trunk/test/spritedit.c
r527 r665 34 34 } 35 35 36 qq = cucul_init( );36 qq = cucul_init(0, 0); 37 37 if(!qq) 38 38 return 1; -
libcaca/trunk/test/unicode.c
r646 r665 30 30 caca_t *kk; 31 31 32 qq = cucul_init( );32 qq = cucul_init(0, 0); 33 33 kk = caca_attach(qq); 34 34
Note: See TracChangeset
for help on using the changeset viewer.