From: Dan Nicholson Date: Sat, 28 Mar 2009 18:56:35 +0000 (-0700) Subject: Expose all the geometry allocation subroutines X-Git-Tag: xkbcommon-0.2.0~964 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f08ae1e56c8cd99485447146bfd8528e6576c2b;p=platform%2Fupstream%2Flibxkbcommon.git Expose all the geometry allocation subroutines We need a couple in xkbcomp, but they might also be needed externally, too. --- diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h index 7eafa77..502ede0 100644 --- a/include/X11/extensions/XKBcommon.h +++ b/include/X11/extensions/XKBcommon.h @@ -147,6 +147,48 @@ extern void XkbcFreeGeometry(XkbGeometryPtr geom, unsigned which, Bool freeMap); extern int +XkbcAllocGeomProps(XkbGeometryPtr geom, int nProps); + +extern int +XkbcAllocGeomColors(XkbGeometryPtr geom, int nColors); + +extern int +XkbcAllocGeomKeyAliases(XkbGeometryPtr geom, int nKeyAliases); + +extern int +XkbcAllocGeomShapes(XkbGeometryPtr geom, int nShapes); + +extern int +XkbcAllocGeomSections(XkbGeometryPtr geom, int nSections); + +extern int +XkbcAllocGeomOverlays(XkbSectionPtr section, int nOverlays); + +extern int +XkbcAllocGeomOverlayRows(XkbOverlayPtr overlay, int nRows); + +extern int +XkbcAllocGeomOverlayKeys(XkbOverlayRowPtr row, int nKeys); + +extern int +XkbcAllocGeomDoodads(XkbGeometryPtr geom, int nDoodads); + +extern int +XkbcAllocGeomSectionDoodads(XkbSectionPtr section, int nDoodads); + +extern int +XkbcAllocGeomOutlines(XkbShapePtr shape, int nOL); + +extern int +XkbcAllocGeomRows(XkbSectionPtr section, int nRows); + +extern int +XkbcAllocGeomPoints(XkbOutlinePtr ol, int nPts); + +extern int +XkbcAllocGeomKeys(XkbRowPtr row, int nKeys); + +extern int XkbcAllocGeometry(XkbcDescPtr xkb, XkbGeometrySizesPtr sizes); extern void diff --git a/src/galloc.c b/src/galloc.c index 67499d6..ad8946d 100644 --- a/src/galloc.c +++ b/src/galloc.c @@ -477,6 +477,90 @@ _XkbGeomAlloc(char **old, unsigned short *num, unsigned short *total, (n), sizeof(XkbOverlayKeyRec)) int +XkbcAllocGeomProps(XkbGeometryPtr geom, int nProps) +{ + return _XkbAllocProps(geom, nProps); +} + +int +XkbcAllocGeomColors(XkbGeometryPtr geom, int nColors) +{ + return _XkbAllocColors(geom, nColors); +} + +int +XkbcAllocGeomKeyAliases(XkbGeometryPtr geom, int nKeyAliases) +{ + return _XkbAllocKeyAliases(geom, nKeyAliases); +} + +int +XkbcAllocGeomShapes(XkbGeometryPtr geom, int nShapes) +{ + return _XkbAllocShapes(geom, nShapes); +} + +int +XkbcAllocGeomSections(XkbGeometryPtr geom, int nSections) +{ + return _XkbAllocSections(geom, nSections); +} + +int +XkbcAllocGeomOverlays(XkbSectionPtr section, int nOverlays) +{ + return _XkbAllocOverlays(section, nOverlays); +} + +int +XkbcAllocGeomOverlayRows(XkbOverlayPtr overlay, int nRows) +{ + return _XkbAllocOverlayRows(overlay, nRows); +} + +int +XkbcAllocGeomOverlayKeys(XkbOverlayRowPtr row, int nKeys) +{ + return _XkbAllocOverlayKeys(row, nKeys); +} + +int +XkbcAllocGeomDoodads(XkbGeometryPtr geom, int nDoodads) +{ + return _XkbAllocDoodads(geom, nDoodads); +} + +int +XkbcAllocGeomSectionDoodads(XkbSectionPtr section, int nDoodads) +{ + return _XkbAllocDoodads(section, nDoodads); +} + +int +XkbcAllocGeomOutlines(XkbShapePtr shape, int nOL) +{ + return _XkbAllocOutlines(shape, nOL); +} + +int +XkbcAllocGeomRows(XkbSectionPtr section, int nRows) +{ + return _XkbAllocRows(section, nRows); +} + +int +XkbcAllocGeomPoints(XkbOutlinePtr ol, int nPts) +{ + return _XkbAllocPoints(ol, nPts); +} + +int +XkbcAllocGeomKeys(XkbRowPtr row, int nKeys) +{ + return _XkbAllocKeys(row, nKeys); +} + +int XkbcAllocGeometry(XkbcDescPtr xkb, XkbGeometrySizesPtr sizes) { XkbGeometryPtr geom;