source: libcaca/trunk/caca/driver/null.c @ 4333

Last change on this file since 4333 was 4333, checked in by Sam Hocevar, 10 years ago

Large source code cleanup, getting rid of spaces, tabs, and svn keywords.

  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1/*
2 *  libcaca       Colour ASCII-Art library
3 *  Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
4 *                All Rights Reserved
5 *
6 *  This library is free software. It comes without any warranty, to
7 *  the extent permitted by applicable law. You can redistribute it
8 *  and/or modify it under the terms of the Do What The Fuck You Want
9 *  To Public License, Version 2, as published by Sam Hocevar. See
10 *  http://sam.zoy.org/wtfpl/COPYING for more details.
11 */
12
13/*
14 *  This file contains a null libcaca input and output driver
15 */
16
17#include "config.h"
18
19#if !defined(__KERNEL__)
20
21#include <stdio.h>
22
23#include "caca.h"
24#include "caca_internals.h"
25
26static int null_init_graphics(caca_display_t *dp)
27{
28    return 0;
29}
30
31static int null_end_graphics(caca_display_t *dp)
32{
33    return 0;
34}
35
36static int null_set_display_title(caca_display_t *dp, char const *title)
37{
38    return -1;
39}
40
41static int null_get_display_width(caca_display_t const *dp)
42{
43    return 0;
44}
45
46static int null_get_display_height(caca_display_t const *dp)
47{
48    return 0;
49}
50
51static void null_display(caca_display_t *dp)
52{
53    ;
54}
55
56static void null_handle_resize(caca_display_t *dp)
57{
58    ;
59}
60
61static int null_get_event(caca_display_t *dp, caca_privevent_t *ev)
62{
63    ev->type = CACA_EVENT_NONE;
64    return 0;
65}
66
67/*
68 * Driver initialisation
69 */
70
71int null_install(caca_display_t *dp)
72{
73    dp->drv.id = CACA_DRIVER_NULL;
74    dp->drv.driver = "null";
75
76    dp->drv.init_graphics = null_init_graphics;
77    dp->drv.end_graphics = null_end_graphics;
78    dp->drv.set_display_title = null_set_display_title;
79    dp->drv.get_display_width = null_get_display_width;
80    dp->drv.get_display_height = null_get_display_height;
81    dp->drv.display = null_display;
82    dp->drv.handle_resize = null_handle_resize;
83    dp->drv.get_event = null_get_event;
84    dp->drv.set_mouse = NULL;
85    dp->drv.set_cursor = NULL;
86
87    return 0;
88}
89
90#endif /* !__KERNEL__ */
Note: See TracBrowser for help on using the repository browser.