You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

91 lines
1.9 KiB

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