/binding/cairo/xlib.d

http://github.com/wilkie/djehuty · D · 87 lines · 16 code · 27 blank · 44 comment · 0 complexity · 1b6171d7a02daf072964d08a5690da32 MD5 · raw file

  1. /*
  2. * xlib.d
  3. *
  4. * This file holds bindings to cairo's xlib.h. The original copyright
  5. * is displayed below, but does not pertain to this file.
  6. *
  7. * Author: Dave Wilkinson
  8. *
  9. */
  10. module binding.cairo.xlib;
  11. /* cairo - a vector graphics library with display and print output
  12. *
  13. * Copyright © 2002 University of Southern California
  14. *
  15. * This library is free software; you can redistribute it and/or
  16. * modify it either under the terms of the GNU Lesser General Public
  17. * License version 2.1 as published by the Free Software Foundation
  18. * (the "LGPL") or, at your option, under the terms of the Mozilla
  19. * Public License Version 1.1 (the "MPL"). If you do not alter this
  20. * notice, a recipient may use your version of this file under either
  21. * the MPL or the LGPL.
  22. *
  23. * You should have received a copy of the LGPL along with this library
  24. * in the file COPYING-LGPL-2.1; if not, write to the Free Software
  25. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  26. * You should have received a copy of the MPL along with this library
  27. * in the file COPYING-MPL-1.1
  28. *
  29. * The contents of this file are subject to the Mozilla Public License
  30. * Version 1.1 (the "License"); you may not use this file except in
  31. * compliance with the License. You may obtain a copy of the License at
  32. * http://www.mozilla.org/MPL/
  33. *
  34. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  35. * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  36. * the specific language governing rights and limitations.
  37. *
  38. * The Original Code is the cairo graphics library.
  39. *
  40. * The Initial Developer of the Original Code is University of Southern
  41. * California.
  42. *
  43. * Contributor(s):
  44. * Carl D. Worth <cworth@cworth.org>
  45. */
  46. import binding.cairo.cairo;
  47. import binding.x.Xlib;
  48. import binding.x.X;
  49. extern(C):
  50. cairo_surface_t* cairo_xlib_surface_create (Display* dpy, Drawable drawable, Visual* visual, int width, int height);
  51. cairo_surface_t* cairo_xlib_surface_create_for_bitmap (Display* dpy, Pixmap bitmap, Screen* screen, int width, int height);
  52. void cairo_xlib_surface_set_size (cairo_surface_t *surface, int width, int height);
  53. void cairo_xlib_surface_set_drawable (cairo_surface_t *surface, Drawable drawable, int width, int height);
  54. Display* cairo_xlib_surface_get_display(cairo_surface_t* surface);
  55. Drawable cairo_xlib_surface_get_drawable(cairo_surface_t* surface);
  56. Screen* cairo_xlib_surface_get_screen(cairo_surface_t* surface);
  57. Visual* cairo_xlib_surface_get_visual(cairo_surface_t* surface);
  58. int cairo_xlib_surface_get_depth(cairo_surface_t* surface);
  59. int cairo_xlib_surface_get_width(cairo_surface_t* surface);
  60. int cairo_xlib_surface_get_height(cairo_surface_t* surface);