/Testing/Tools/cxxtest/test/fake/X11/Xlib.h

https://github.com/mantidproject/mantid · C Header · 52 lines · 40 code · 5 blank · 7 comment · 0 complexity · 1e251614c2a372926e59ba3772f2ed8f MD5 · raw file

  1. // Mantid Repository : https://github.com/mantidproject/mantid
  2. //
  3. // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
  4. // NScD Oak Ridge National Laboratory, European Spallation Source,
  5. // Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
  6. // SPDX - License - Identifier: GPL - 3.0 +
  7. // Fake Xlib.h
  8. struct Display {};
  9. typedef int Window, Colormap, GC;
  10. typedef const char *XID;
  11. struct XFontStruct { int ascent, descent; };
  12. struct Screen {};
  13. struct XColor { int pixel; };
  14. enum { Success, ExposureMask };
  15. inline Display *XOpenDisplay(void *) { return 0; }
  16. inline Colormap DefaultColormap( Display *, int ) { return 0; }
  17. inline void XParseColor( Display *, Colormap, const char *, XColor * ) {}
  18. inline int XAllocColor( Display *, Colormap, XColor *) { return 0; }
  19. inline Window XCreateSimpleWindow( Display *, Window, int, int, int, int, int, int, int ) { return 0; }
  20. inline Window RootWindow( Display *, int ) { return 0; }
  21. inline GC XCreateGC( Display *, Window, int, int ) { return 0; }
  22. inline XID XLoadFont( Display *, const char * ) { return 0; }
  23. inline int XSetFont( Display *, GC, XID ) { return 0; }
  24. inline XID XGContextFromGC( GC ) { return 0; }
  25. inline XFontStruct *XQueryFont( Display *, const char * ) { return 0; }
  26. inline int XFreeFontInfo( char **, XFontStruct *, int ) { return 0; }
  27. inline int XSelectInput( Display *, Window, int ) { return 0; }
  28. inline int XMapWindow( Display *, Window ) { return 0; }
  29. inline Screen *XDefaultScreenOfDisplay( Display * ) { return 0; }
  30. inline int WidthOfScreen( Screen * ) { return 0; }
  31. inline int HeightOfScreen( Screen * ) { return 0; }
  32. inline int XMoveResizeWindow( Display *, Window, int, int, int, int ) { return 0; }
  33. struct XEvent {};
  34. inline int XCheckMaskEvent( Display *, int, XEvent * ) { return 0; }
  35. inline int XSetStandardProperties( Display *, Window, const char *, int, int, int, int, int ) { return 0; }
  36. struct XWindowAttributes { int width, height; };
  37. inline int XGetWindowAttributes( Display *, Window, XWindowAttributes * ) { return 0; }
  38. inline int XSetForeground( Display *, GC, unsigned long ) { return 0; }
  39. inline int XSetBackground( Display *, GC, unsigned long ) { return 0; }
  40. inline int XFillRectangle( Display *, Window, GC, int, int, int, int ) { return 0; }
  41. inline int XDrawLine( Display *, Window, GC, int, int, int, int ) { return 0; }
  42. inline int XDrawString( Display *, Window, GC, int, int, const char *, int ) { return 0; }
  43. inline int XFlush( Display * ) { return 0; }
  44. inline int XFreeGC( Display *, GC ) { return 0; }
  45. inline int XDestroyWindow( Display *, Window ) { return 0; }
  46. inline int XCloseDisplay( Display * ) { return 0; }
  47. inline int XTextWidth( XFontStruct *, const char *, int ) { return 0; }