Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * libcaca Colour ASCII-Art library
  3. * Copyright (c) 2002-2012 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://www.wtfpl.net/ for more details.
  11. */
  12. /*
  13. * This file contains a null libcaca input and output driver
  14. */
  15. #include "config.h"
  16. #if !defined(__KERNEL__)
  17. #include <stdio.h>
  18. #include "caca.h"
  19. #include "caca_internals.h"
  20. static int null_init_graphics(caca_display_t *dp)
  21. {
  22. return 0;
  23. }
  24. static int null_end_graphics(caca_display_t *dp)
  25. {
  26. return 0;
  27. }
  28. static int null_set_display_title(caca_display_t *dp, char const *title)
  29. {
  30. return -1;
  31. }
  32. static int null_get_display_width(caca_display_t const *dp)
  33. {
  34. return 0;
  35. }
  36. static int null_get_display_height(caca_display_t const *dp)
  37. {
  38. return 0;
  39. }
  40. static void null_display(caca_display_t *dp)
  41. {
  42. ;
  43. }
  44. static void null_handle_resize(caca_display_t *dp)
  45. {
  46. ;
  47. }
  48. static int null_get_event(caca_display_t *dp, caca_privevent_t *ev)
  49. {
  50. ev->type = CACA_EVENT_NONE;
  51. return 0;
  52. }
  53. /*
  54. * Driver initialisation
  55. */
  56. int null_install(caca_display_t *dp)
  57. {
  58. dp->drv.id = CACA_DRIVER_NULL;
  59. dp->drv.driver = "null";
  60. dp->drv.init_graphics = null_init_graphics;
  61. dp->drv.end_graphics = null_end_graphics;
  62. dp->drv.set_display_title = null_set_display_title;
  63. dp->drv.get_display_width = null_get_display_width;
  64. dp->drv.get_display_height = null_get_display_height;
  65. dp->drv.display = null_display;
  66. dp->drv.handle_resize = null_handle_resize;
  67. dp->drv.get_event = null_get_event;
  68. dp->drv.set_mouse = NULL;
  69. dp->drv.set_cursor = NULL;
  70. return 0;
  71. }
  72. #endif /* !__KERNEL__ */