/binding/pango/item.d

http://github.com/wilkie/djehuty · D · 78 lines · 32 code · 15 blank · 31 comment · 0 complexity · 015b134fb59d8402ca6331a199f191d5 MD5 · raw file

  1. /*
  2. * item.d
  3. *
  4. * This file holds bindings to pango's pango-item.h. The original
  5. * copyright is displayed below.
  6. *
  7. * Author: Dave Wilkinson
  8. *
  9. */
  10. module binding.pango.item;
  11. /* Pango
  12. * pango-item.h: Structure for storing run information
  13. *
  14. * Copyright (C) 2000 Red Hat Software
  15. *
  16. * This library is free software; you can redistribute it and/or
  17. * modify it under the terms of the GNU Library General Public
  18. * License as published by the Free Software Foundation; either
  19. * version 2 of the License, or (at your option) any later version.
  20. *
  21. * This library is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  24. * Library General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU Library General Public
  27. * License along with this library; if not, write to the
  28. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  29. * Boston, MA 02111-1307, USA.
  30. */
  31. import binding.pango.types;
  32. import binding.pango.engine;
  33. import binding.pango.font;
  34. alias _PangoAnalysis PangoAnalysis;
  35. alias _PangoItem PangoItem;
  36. /* TODO: if more flags are needed, turn this into a real PangoAnalysisFlags enum */
  37. const auto PANGO_ANALYSIS_FLAG_CENTERED_BASELINE = (1 << 0);
  38. struct _PangoAnalysis
  39. {
  40. PangoEngineShape *shape_engine;
  41. PangoEngineLang *lang_engine;
  42. PangoFont *font;
  43. guint8 level;
  44. guint8 gravity; /* PangoGravity */
  45. guint8 flags;
  46. PangoLanguage *language;
  47. GSList *extra_attrs;
  48. }
  49. struct _PangoItem
  50. {
  51. gint offset;
  52. gint length;
  53. gint num_chars;
  54. PangoAnalysis analysis;
  55. }
  56. //#define PANGO_TYPE_ITEM (pango_item_get_type ())
  57. GType pango_item_get_type ();
  58. PangoItem *pango_item_new ();
  59. PangoItem *pango_item_copy (PangoItem *item);
  60. void pango_item_free (PangoItem *item);
  61. PangoItem *pango_item_split (PangoItem *orig,
  62. int split_index,
  63. int split_offset);