Lines Matching refs:geom

142 XkbFreeGeomProperties(XkbGeometryPtr geom, int first, int count, Bool freeAll)  in XkbFreeGeomProperties()  argument
145 &geom->num_properties, &geom->sz_properties, in XkbFreeGeomProperties()
146 (char **) &geom->properties, in XkbFreeGeomProperties()
154 XkbFreeGeomKeyAliases(XkbGeometryPtr geom, int first, int count, Bool freeAll) in XkbFreeGeomKeyAliases() argument
157 &geom->num_key_aliases, &geom->sz_key_aliases, in XkbFreeGeomKeyAliases()
158 (char **) &geom->key_aliases, sizeof(XkbKeyAliasRec)); in XkbFreeGeomKeyAliases()
174 XkbFreeGeomColors(XkbGeometryPtr geom, int first, int count, Bool freeAll) in XkbFreeGeomColors() argument
177 &geom->num_colors, &geom->sz_colors, in XkbFreeGeomColors()
178 (char **) &geom->colors, in XkbFreeGeomColors()
230 XkbFreeGeomShapes(XkbGeometryPtr geom, int first, int count, Bool freeAll) in XkbFreeGeomShapes() argument
233 &geom->num_shapes, &geom->sz_shapes, in XkbFreeGeomShapes()
234 (char **) &geom->shapes, in XkbFreeGeomShapes()
299 XkbFreeGeomSections(XkbGeometryPtr geom, int first, int count, Bool freeAll) in XkbFreeGeomSections() argument
302 &geom->num_sections, &geom->sz_sections, in XkbFreeGeomSections()
303 (char **) &geom->sections, in XkbFreeGeomSections()
351 XkbFreeGeometry(XkbGeometryPtr geom, unsigned which, Bool freeMap) in XkbFreeGeometry() argument
353 if (geom == NULL) in XkbFreeGeometry()
357 if ((which & XkbGeomPropertiesMask) && (geom->properties != NULL)) in XkbFreeGeometry()
358 XkbFreeGeomProperties(geom, 0, geom->num_properties, TRUE); in XkbFreeGeometry()
359 if ((which & XkbGeomColorsMask) && (geom->colors != NULL)) in XkbFreeGeometry()
360 XkbFreeGeomColors(geom, 0, geom->num_colors, TRUE); in XkbFreeGeometry()
361 if ((which & XkbGeomShapesMask) && (geom->shapes != NULL)) in XkbFreeGeometry()
362 XkbFreeGeomShapes(geom, 0, geom->num_shapes, TRUE); in XkbFreeGeometry()
363 if ((which & XkbGeomSectionsMask) && (geom->sections != NULL)) in XkbFreeGeometry()
364 XkbFreeGeomSections(geom, 0, geom->num_sections, TRUE); in XkbFreeGeometry()
365 if ((which & XkbGeomDoodadsMask) && (geom->doodads != NULL)) { in XkbFreeGeometry()
366 XkbFreeGeomDoodads(geom->doodads, geom->num_doodads, TRUE); in XkbFreeGeometry()
367 geom->doodads = NULL; in XkbFreeGeometry()
368 geom->num_doodads = geom->sz_doodads = 0; in XkbFreeGeometry()
370 if ((which & XkbGeomKeyAliasesMask) && (geom->key_aliases != NULL)) in XkbFreeGeometry()
371 XkbFreeGeomKeyAliases(geom, 0, geom->num_key_aliases, TRUE); in XkbFreeGeometry()
373 free(geom->label_font); in XkbFreeGeometry()
374 geom->label_font = NULL; in XkbFreeGeometry()
375 free(geom); in XkbFreeGeometry()
503 XkbGeometryPtr geom; in XkbAllocGeometry() local
506 if (xkb->geom == NULL) { in XkbAllocGeometry()
507 xkb->geom = calloc(1, sizeof(XkbGeometryRec)); in XkbAllocGeometry()
508 if (!xkb->geom) in XkbAllocGeometry()
511 geom = xkb->geom; in XkbAllocGeometry()
513 ((rtrn = _XkbAllocProps(geom, sizes->num_properties)) != Success)) { in XkbAllocGeometry()
517 ((rtrn = _XkbAllocColors(geom, sizes->num_colors)) != Success)) { in XkbAllocGeometry()
521 ((rtrn = _XkbAllocShapes(geom, sizes->num_shapes)) != Success)) { in XkbAllocGeometry()
525 ((rtrn = _XkbAllocSections(geom, sizes->num_sections)) != Success)) { in XkbAllocGeometry()
529 ((rtrn = _XkbAllocDoodads(geom, sizes->num_doodads)) != Success)) { in XkbAllocGeometry()
534 _XkbAllocKeyAliases(geom, sizes->num_key_aliases)) != Success)) { in XkbAllocGeometry()
539 XkbFreeGeometry(geom, XkbGeomAllMask, TRUE); in XkbAllocGeometry()
540 xkb->geom = NULL; in XkbAllocGeometry()
547 XkbAddGeomProperty(XkbGeometryPtr geom, char *name, char *value) in XkbAddGeomProperty() argument
552 if ((!geom) || (!name) || (!value)) in XkbAddGeomProperty()
554 for (i = 0, prop = geom->properties; i < geom->num_properties; i++, prop++) { in XkbAddGeomProperty()
561 if ((geom->num_properties >= geom->sz_properties) && in XkbAddGeomProperty()
562 (_XkbAllocProps(geom, 1) != Success)) { in XkbAddGeomProperty()
565 prop = &geom->properties[geom->num_properties]; in XkbAddGeomProperty()
575 geom->num_properties++; in XkbAddGeomProperty()
580 XkbAddGeomKeyAlias(XkbGeometryPtr geom, char *aliasStr, char *realStr) in XkbAddGeomKeyAlias() argument
585 if ((!geom) || (!aliasStr) || (!realStr) || (!aliasStr[0]) || (!realStr[0])) in XkbAddGeomKeyAlias()
587 for (i = 0, alias = geom->key_aliases; i < geom->num_key_aliases; in XkbAddGeomKeyAlias()
595 if ((geom->num_key_aliases >= geom->sz_key_aliases) && in XkbAddGeomKeyAlias()
596 (_XkbAllocKeyAliases(geom, 1) != Success)) { in XkbAddGeomKeyAlias()
599 alias = &geom->key_aliases[geom->num_key_aliases]; in XkbAddGeomKeyAlias()
603 geom->num_key_aliases++; in XkbAddGeomKeyAlias()
608 XkbAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel) in XkbAddGeomColor() argument
613 if ((!geom) || (!spec)) in XkbAddGeomColor()
615 for (i = 0, color = geom->colors; i < geom->num_colors; i++, color++) { in XkbAddGeomColor()
621 if ((geom->num_colors >= geom->sz_colors) && in XkbAddGeomColor()
622 (_XkbAllocColors(geom, 1) != Success)) { in XkbAddGeomColor()
625 color = &geom->colors[geom->num_colors]; in XkbAddGeomColor()
630 geom->num_colors++; in XkbAddGeomColor()
654 XkbAddGeomShape(XkbGeometryPtr geom, Atom name, int sz_outlines) in XkbAddGeomShape() argument
659 if ((!geom) || (!name) || (sz_outlines < 0)) in XkbAddGeomShape()
661 if (geom->num_shapes > 0) { in XkbAddGeomShape()
662 for (shape = geom->shapes, i = 0; i < geom->num_shapes; i++, shape++) { in XkbAddGeomShape()
667 if ((geom->num_shapes >= geom->sz_shapes) && in XkbAddGeomShape()
668 (_XkbAllocShapes(geom, 1) != Success)) in XkbAddGeomShape()
670 shape = &geom->shapes[geom->num_shapes]; in XkbAddGeomShape()
676 geom->num_shapes++; in XkbAddGeomShape()
713 XkbAddGeomSection(XkbGeometryPtr geom, in XkbAddGeomSection() argument
719 if ((!geom) || (name == None) || (sz_rows < 0)) in XkbAddGeomSection()
721 for (i = 0, section = geom->sections; i < geom->num_sections; in XkbAddGeomSection()
732 if ((geom->num_sections >= geom->sz_sections) && in XkbAddGeomSection()
733 (_XkbAllocSections(geom, 1) != Success)) in XkbAddGeomSection()
735 section = &geom->sections[geom->num_sections]; in XkbAddGeomSection()
747 geom->num_sections++; in XkbAddGeomSection()
752 XkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name) in XkbAddGeomDoodad() argument
757 if ((!geom) || (name == None)) in XkbAddGeomDoodad()
764 old = geom->doodads; in XkbAddGeomDoodad()
765 nDoodads = geom->num_doodads; in XkbAddGeomDoodad()
772 if ((section->num_doodads >= geom->sz_doodads) && in XkbAddGeomDoodad()
779 if ((geom->num_doodads >= geom->sz_doodads) && in XkbAddGeomDoodad()
780 (_XkbAllocDoodads(geom, 1) != Success)) in XkbAddGeomDoodad()
782 doodad = &geom->doodads[geom->num_doodads++]; in XkbAddGeomDoodad()