15afda2e6Smrg/************************************************************ 25afda2e6SmrgCopyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 35afda2e6Smrg 45afda2e6SmrgPermission to use, copy, modify, and distribute this 55afda2e6Smrgsoftware and its documentation for any purpose and without 65afda2e6Smrgfee is hereby granted, provided that the above copyright 75afda2e6Smrgnotice appear in all copies and that both that copyright 85afda2e6Smrgnotice and this permission notice appear in supporting 95afda2e6Smrgdocumentation, and that the name of Silicon Graphics not be 105afda2e6Smrgused in advertising or publicity pertaining to distribution 115afda2e6Smrgof the software without specific prior written permission. 125afda2e6SmrgSilicon Graphics makes no representation about the suitability 135afda2e6Smrgof this software for any purpose. It is provided "as is" 145afda2e6Smrgwithout any express or implied warranty. 155afda2e6Smrg 165afda2e6SmrgSILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 175afda2e6SmrgSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 185afda2e6SmrgAND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 195afda2e6SmrgGRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 205afda2e6SmrgDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 215afda2e6SmrgDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 225afda2e6SmrgOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 235afda2e6SmrgTHE USE OR PERFORMANCE OF THIS SOFTWARE. 245afda2e6Smrg 255afda2e6Smrg********************************************************/ 265afda2e6Smrg 275afda2e6Smrg#ifndef _XKBGEOM_H_ 285afda2e6Smrg#define _XKBGEOM_H_ 295afda2e6Smrg 305afda2e6Smrg#include <X11/extensions/XKBstr.h> 315afda2e6Smrg 325afda2e6Smrgtypedef struct _XkbProperty { 335afda2e6Smrg char *name; 345afda2e6Smrg char *value; 355afda2e6Smrg} XkbPropertyRec,*XkbPropertyPtr; 365afda2e6Smrg 375afda2e6Smrgtypedef struct _XkbColor { 385afda2e6Smrg unsigned int pixel; 395afda2e6Smrg char * spec; 405afda2e6Smrg} XkbColorRec,*XkbColorPtr; 415afda2e6Smrg 425afda2e6Smrgtypedef struct _XkbPoint { 435afda2e6Smrg short x; 445afda2e6Smrg short y; 455afda2e6Smrg} XkbPointRec, *XkbPointPtr; 465afda2e6Smrg 475afda2e6Smrgtypedef struct _XkbBounds { 485afda2e6Smrg short x1,y1; 495afda2e6Smrg short x2,y2; 505afda2e6Smrg} XkbBoundsRec, *XkbBoundsPtr; 515afda2e6Smrg#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) 525afda2e6Smrg#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) 535afda2e6Smrg 545afda2e6Smrg/* 555afda2e6Smrg * In the following structs, this pattern is used for dynamically sized arrays: 565afda2e6Smrg * foo is an array for which sz_foo entries are allocated & num_foo are used 575afda2e6Smrg */ 585afda2e6Smrg 595afda2e6Smrgtypedef struct _XkbOutline { 605afda2e6Smrg unsigned short num_points; 615afda2e6Smrg unsigned short sz_points; 625afda2e6Smrg unsigned short corner_radius; 635afda2e6Smrg XkbPointPtr points; 645afda2e6Smrg} XkbOutlineRec, *XkbOutlinePtr; 655afda2e6Smrg 665afda2e6Smrgtypedef struct _XkbShape { 675afda2e6Smrg Atom name; 685afda2e6Smrg unsigned short num_outlines; 695afda2e6Smrg unsigned short sz_outlines; 705afda2e6Smrg XkbOutlinePtr outlines; 715afda2e6Smrg XkbOutlinePtr approx; 725afda2e6Smrg XkbOutlinePtr primary; 735afda2e6Smrg XkbBoundsRec bounds; 745afda2e6Smrg} XkbShapeRec, *XkbShapePtr; 755afda2e6Smrg#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) 765afda2e6Smrg 775afda2e6Smrgtypedef struct _XkbShapeDoodad { 785afda2e6Smrg Atom name; 795afda2e6Smrg unsigned char type; 805afda2e6Smrg unsigned char priority; 815afda2e6Smrg short top; 825afda2e6Smrg short left; 835afda2e6Smrg short angle; 845afda2e6Smrg unsigned short color_ndx; 855afda2e6Smrg unsigned short shape_ndx; 865afda2e6Smrg} XkbShapeDoodadRec, *XkbShapeDoodadPtr; 875afda2e6Smrg#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) 885afda2e6Smrg#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) 895afda2e6Smrg#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) 905afda2e6Smrg#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) 915afda2e6Smrg 925afda2e6Smrgtypedef struct _XkbTextDoodad { 935afda2e6Smrg Atom name; 945afda2e6Smrg unsigned char type; 955afda2e6Smrg unsigned char priority; 965afda2e6Smrg short top; 975afda2e6Smrg short left; 985afda2e6Smrg short angle; 995afda2e6Smrg short width; 1005afda2e6Smrg short height; 1015afda2e6Smrg unsigned short color_ndx; 1025afda2e6Smrg char * text; 1035afda2e6Smrg char * font; 1045afda2e6Smrg} XkbTextDoodadRec, *XkbTextDoodadPtr; 1055afda2e6Smrg#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) 1065afda2e6Smrg#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) 1075afda2e6Smrg 1085afda2e6Smrgtypedef struct _XkbIndicatorDoodad { 1095afda2e6Smrg Atom name; 1105afda2e6Smrg unsigned char type; 1115afda2e6Smrg unsigned char priority; 1125afda2e6Smrg short top; 1135afda2e6Smrg short left; 1145afda2e6Smrg short angle; 1155afda2e6Smrg unsigned short shape_ndx; 1165afda2e6Smrg unsigned short on_color_ndx; 1175afda2e6Smrg unsigned short off_color_ndx; 1185afda2e6Smrg} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr; 1195afda2e6Smrg#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) 1205afda2e6Smrg#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) 1215afda2e6Smrg#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) 1225afda2e6Smrg#define XkbSetIndicatorDoodadOnColor(g,d,c) \ 1235afda2e6Smrg ((d)->on_color_ndx= (c)-&(g)->colors[0]) 1245afda2e6Smrg#define XkbSetIndicatorDoodadOffColor(g,d,c) \ 1255afda2e6Smrg ((d)->off_color_ndx= (c)-&(g)->colors[0]) 1265afda2e6Smrg#define XkbSetIndicatorDoodadShape(g,d,s) \ 1275afda2e6Smrg ((d)->shape_ndx= (s)-&(g)->shapes[0]) 1285afda2e6Smrg 1295afda2e6Smrgtypedef struct _XkbLogoDoodad { 1305afda2e6Smrg Atom name; 1315afda2e6Smrg unsigned char type; 1325afda2e6Smrg unsigned char priority; 1335afda2e6Smrg short top; 1345afda2e6Smrg short left; 1355afda2e6Smrg short angle; 1365afda2e6Smrg unsigned short color_ndx; 1375afda2e6Smrg unsigned short shape_ndx; 1385afda2e6Smrg char * logo_name; 1395afda2e6Smrg} XkbLogoDoodadRec, *XkbLogoDoodadPtr; 1405afda2e6Smrg#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) 1415afda2e6Smrg#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) 1425afda2e6Smrg#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) 1435afda2e6Smrg#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) 1445afda2e6Smrg 1455afda2e6Smrgtypedef struct _XkbAnyDoodad { 1465afda2e6Smrg Atom name; 1475afda2e6Smrg unsigned char type; 1485afda2e6Smrg unsigned char priority; 1495afda2e6Smrg short top; 1505afda2e6Smrg short left; 1515afda2e6Smrg short angle; 1525afda2e6Smrg} XkbAnyDoodadRec, *XkbAnyDoodadPtr; 1535afda2e6Smrg 1545afda2e6Smrgtypedef union _XkbDoodad { 1555afda2e6Smrg XkbAnyDoodadRec any; 1565afda2e6Smrg XkbShapeDoodadRec shape; 1575afda2e6Smrg XkbTextDoodadRec text; 1585afda2e6Smrg XkbIndicatorDoodadRec indicator; 1595afda2e6Smrg XkbLogoDoodadRec logo; 1605afda2e6Smrg} XkbDoodadRec, *XkbDoodadPtr; 1615afda2e6Smrg 1625afda2e6Smrg#define XkbUnknownDoodad 0 1635afda2e6Smrg#define XkbOutlineDoodad 1 1645afda2e6Smrg#define XkbSolidDoodad 2 1655afda2e6Smrg#define XkbTextDoodad 3 1665afda2e6Smrg#define XkbIndicatorDoodad 4 1675afda2e6Smrg#define XkbLogoDoodad 5 1685afda2e6Smrg 1695afda2e6Smrgtypedef struct _XkbKey { 1705afda2e6Smrg XkbKeyNameRec name; 1715afda2e6Smrg short gap; 1725afda2e6Smrg unsigned char shape_ndx; 1735afda2e6Smrg unsigned char color_ndx; 1745afda2e6Smrg} XkbKeyRec, *XkbKeyPtr; 1755afda2e6Smrg#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) 1765afda2e6Smrg#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) 1775afda2e6Smrg#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) 1785afda2e6Smrg#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) 1795afda2e6Smrg 1805afda2e6Smrgtypedef struct _XkbRow { 1815afda2e6Smrg short top; 1825afda2e6Smrg short left; 1835afda2e6Smrg unsigned short num_keys; 1845afda2e6Smrg unsigned short sz_keys; 1855afda2e6Smrg int vertical; 1865afda2e6Smrg XkbKeyPtr keys; 1875afda2e6Smrg XkbBoundsRec bounds; 1885afda2e6Smrg} XkbRowRec, *XkbRowPtr; 1895afda2e6Smrg 1905afda2e6Smrgtypedef struct _XkbSection { 1915afda2e6Smrg Atom name; 1925afda2e6Smrg unsigned char priority; 1935afda2e6Smrg short top; 1945afda2e6Smrg short left; 1955afda2e6Smrg unsigned short width; 1965afda2e6Smrg unsigned short height; 1975afda2e6Smrg short angle; 1985afda2e6Smrg unsigned short num_rows; 1995afda2e6Smrg unsigned short num_doodads; 2005afda2e6Smrg unsigned short num_overlays; 2015afda2e6Smrg unsigned short sz_rows; 2025afda2e6Smrg unsigned short sz_doodads; 2035afda2e6Smrg unsigned short sz_overlays; 2045afda2e6Smrg XkbRowPtr rows; 2055afda2e6Smrg XkbDoodadPtr doodads; 2065afda2e6Smrg XkbBoundsRec bounds; 2075afda2e6Smrg struct _XkbOverlay *overlays; 2085afda2e6Smrg} XkbSectionRec, *XkbSectionPtr; 2095afda2e6Smrg 2105afda2e6Smrgtypedef struct _XkbOverlayKey { 2115afda2e6Smrg XkbKeyNameRec over; 2125afda2e6Smrg XkbKeyNameRec under; 2135afda2e6Smrg} XkbOverlayKeyRec,*XkbOverlayKeyPtr; 2145afda2e6Smrg 2155afda2e6Smrgtypedef struct _XkbOverlayRow { 2165afda2e6Smrg unsigned short row_under; 2175afda2e6Smrg unsigned short num_keys; 2185afda2e6Smrg unsigned short sz_keys; 2195afda2e6Smrg XkbOverlayKeyPtr keys; 2205afda2e6Smrg} XkbOverlayRowRec,*XkbOverlayRowPtr; 2215afda2e6Smrg 2225afda2e6Smrgtypedef struct _XkbOverlay { 2235afda2e6Smrg Atom name; 2245afda2e6Smrg XkbSectionPtr section_under; 2255afda2e6Smrg unsigned short num_rows; 2265afda2e6Smrg unsigned short sz_rows; 2275afda2e6Smrg XkbOverlayRowPtr rows; 2285afda2e6Smrg XkbBoundsPtr bounds; 2295afda2e6Smrg} XkbOverlayRec,*XkbOverlayPtr; 2305afda2e6Smrg 2315afda2e6Smrgtypedef struct _XkbGeometry { 2325afda2e6Smrg Atom name; 2335afda2e6Smrg unsigned short width_mm; 2345afda2e6Smrg unsigned short height_mm; 2355afda2e6Smrg char * label_font; 2365afda2e6Smrg XkbColorPtr label_color; 2375afda2e6Smrg XkbColorPtr base_color; 2385afda2e6Smrg unsigned short sz_properties; 2395afda2e6Smrg unsigned short sz_colors; 2405afda2e6Smrg unsigned short sz_shapes; 2415afda2e6Smrg unsigned short sz_sections; 2425afda2e6Smrg unsigned short sz_doodads; 2435afda2e6Smrg unsigned short sz_key_aliases; 2445afda2e6Smrg unsigned short num_properties; 2455afda2e6Smrg unsigned short num_colors; 2465afda2e6Smrg unsigned short num_shapes; 2475afda2e6Smrg unsigned short num_sections; 2485afda2e6Smrg unsigned short num_doodads; 2495afda2e6Smrg unsigned short num_key_aliases; 2505afda2e6Smrg XkbPropertyPtr properties; 2515afda2e6Smrg XkbColorPtr colors; 2525afda2e6Smrg XkbShapePtr shapes; 2535afda2e6Smrg XkbSectionPtr sections; 2545afda2e6Smrg XkbDoodadPtr doodads; 2555afda2e6Smrg XkbKeyAliasPtr key_aliases; 2565afda2e6Smrg} XkbGeometryRec; 2575afda2e6Smrg#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) 2585afda2e6Smrg 2595afda2e6Smrg#define XkbGeomPropertiesMask (1<<0) 2605afda2e6Smrg#define XkbGeomColorsMask (1<<1) 2615afda2e6Smrg#define XkbGeomShapesMask (1<<2) 2625afda2e6Smrg#define XkbGeomSectionsMask (1<<3) 2635afda2e6Smrg#define XkbGeomDoodadsMask (1<<4) 2645afda2e6Smrg#define XkbGeomKeyAliasesMask (1<<5) 2655afda2e6Smrg#define XkbGeomAllMask (0x3f) 2665afda2e6Smrg 2675afda2e6Smrgtypedef struct _XkbGeometrySizes { 2685afda2e6Smrg unsigned int which; 2695afda2e6Smrg unsigned short num_properties; 2705afda2e6Smrg unsigned short num_colors; 2715afda2e6Smrg unsigned short num_shapes; 2725afda2e6Smrg unsigned short num_sections; 2735afda2e6Smrg unsigned short num_doodads; 2745afda2e6Smrg unsigned short num_key_aliases; 2755afda2e6Smrg} XkbGeometrySizesRec,*XkbGeometrySizesPtr; 2765afda2e6Smrg 2775afda2e6Smrg_XFUNCPROTOBEGIN 2785afda2e6Smrg 2795afda2e6Smrgextern XkbPropertyPtr 2805afda2e6SmrgXkbAddGeomProperty( 2815afda2e6Smrg XkbGeometryPtr /* geom */, 282e9628295Smrg _Xconst char * /* name */, 283e9628295Smrg _Xconst char * /* value */ 2845afda2e6Smrg); 2855afda2e6Smrg 2865afda2e6Smrgextern XkbKeyAliasPtr 2875afda2e6SmrgXkbAddGeomKeyAlias( 2885afda2e6Smrg XkbGeometryPtr /* geom */, 289e9628295Smrg _Xconst char * /* alias */, 290e9628295Smrg _Xconst char * /* real */ 2915afda2e6Smrg); 2925afda2e6Smrg 2935afda2e6Smrgextern XkbColorPtr 2945afda2e6SmrgXkbAddGeomColor( 2955afda2e6Smrg XkbGeometryPtr /* geom */, 296e9628295Smrg _Xconst char * /* spec */, 2975afda2e6Smrg unsigned int /* pixel */ 2985afda2e6Smrg); 2995afda2e6Smrg 3005afda2e6Smrgextern XkbOutlinePtr 3015afda2e6SmrgXkbAddGeomOutline( 3025afda2e6Smrg XkbShapePtr /* shape */, 3035afda2e6Smrg int /* sz_points */ 3045afda2e6Smrg); 3055afda2e6Smrg 3065afda2e6Smrgextern XkbShapePtr 3075afda2e6SmrgXkbAddGeomShape( 3085afda2e6Smrg XkbGeometryPtr /* geom */, 3095afda2e6Smrg Atom /* name */, 3105afda2e6Smrg int /* sz_outlines */ 3115afda2e6Smrg); 3125afda2e6Smrg 3135afda2e6Smrgextern XkbKeyPtr 3145afda2e6SmrgXkbAddGeomKey( 3155afda2e6Smrg XkbRowPtr /* row */ 3165afda2e6Smrg); 3175afda2e6Smrg 3185afda2e6Smrgextern XkbRowPtr 3195afda2e6SmrgXkbAddGeomRow( 3205afda2e6Smrg XkbSectionPtr /* section */, 3215afda2e6Smrg int /* sz_keys */ 3225afda2e6Smrg); 3235afda2e6Smrg 3245afda2e6Smrgextern XkbSectionPtr 3255afda2e6SmrgXkbAddGeomSection( 3265afda2e6Smrg XkbGeometryPtr /* geom */, 3275afda2e6Smrg Atom /* name */, 3285afda2e6Smrg int /* sz_rows */, 3295afda2e6Smrg int /* sz_doodads */, 3305afda2e6Smrg int /* sz_overlays */ 3315afda2e6Smrg); 3325afda2e6Smrg 3335afda2e6Smrgextern XkbOverlayPtr 3345afda2e6SmrgXkbAddGeomOverlay( 3355afda2e6Smrg XkbSectionPtr /* section */, 3365afda2e6Smrg Atom /* name */, 3375afda2e6Smrg int /* sz_rows */ 3385afda2e6Smrg); 3395afda2e6Smrg 3405afda2e6Smrgextern XkbOverlayRowPtr 3415afda2e6SmrgXkbAddGeomOverlayRow( 3425afda2e6Smrg XkbOverlayPtr /* overlay */, 3435afda2e6Smrg int /* row_under */, 3445afda2e6Smrg int /* sz_keys */ 3455afda2e6Smrg); 3465afda2e6Smrg 3475afda2e6Smrgextern XkbOverlayKeyPtr 3485afda2e6SmrgXkbAddGeomOverlayKey( 3495afda2e6Smrg XkbOverlayPtr /* overlay */, 3505afda2e6Smrg XkbOverlayRowPtr /* row */, 351e9628295Smrg _Xconst char * /* over */, 352e9628295Smrg _Xconst char * /* under */ 3535afda2e6Smrg); 3545afda2e6Smrg 3555afda2e6Smrgextern XkbDoodadPtr 3565afda2e6SmrgXkbAddGeomDoodad( 3575afda2e6Smrg XkbGeometryPtr /* geom */, 3585afda2e6Smrg XkbSectionPtr /* section */, 3595afda2e6Smrg Atom /* name */ 3605afda2e6Smrg); 3615afda2e6Smrg 3625afda2e6Smrg 3635afda2e6Smrgextern void 3645afda2e6SmrgXkbFreeGeomKeyAliases( 3655afda2e6Smrg XkbGeometryPtr /* geom */, 3665afda2e6Smrg int /* first */, 3675afda2e6Smrg int /* count */, 3685afda2e6Smrg Bool /* freeAll */ 3695afda2e6Smrg); 3705afda2e6Smrg 3715afda2e6Smrgextern void 3725afda2e6SmrgXkbFreeGeomColors( 3735afda2e6Smrg XkbGeometryPtr /* geom */, 3745afda2e6Smrg int /* first */, 3755afda2e6Smrg int /* count */, 3765afda2e6Smrg Bool /* freeAll */ 3775afda2e6Smrg); 3785afda2e6Smrg 3795afda2e6Smrgextern void 3805afda2e6SmrgXkbFreeGeomDoodads( 3815afda2e6Smrg XkbDoodadPtr /* doodads */, 3825afda2e6Smrg int /* nDoodads */, 3835afda2e6Smrg Bool /* freeAll */ 3845afda2e6Smrg); 3855afda2e6Smrg 3865afda2e6Smrg 3875afda2e6Smrgextern void 3885afda2e6SmrgXkbFreeGeomProperties( 3895afda2e6Smrg XkbGeometryPtr /* geom */, 3905afda2e6Smrg int /* first */, 3915afda2e6Smrg int /* count */, 3925afda2e6Smrg Bool /* freeAll */ 3935afda2e6Smrg); 3945afda2e6Smrg 3955afda2e6Smrgextern void 3965afda2e6SmrgXkbFreeGeomOverlayKeys( 3975afda2e6Smrg XkbOverlayRowPtr /* row */, 3985afda2e6Smrg int /* first */, 3995afda2e6Smrg int /* count */, 4005afda2e6Smrg Bool /* freeAll */ 4015afda2e6Smrg); 4025afda2e6Smrg 4035afda2e6Smrgextern void 4045afda2e6SmrgXkbFreeGeomOverlayRows( 4055afda2e6Smrg XkbOverlayPtr /* overlay */, 4065afda2e6Smrg int /* first */, 4075afda2e6Smrg int /* count */, 4085afda2e6Smrg Bool /* freeAll */ 4095afda2e6Smrg); 4105afda2e6Smrg 4115afda2e6Smrgextern void 4125afda2e6SmrgXkbFreeGeomOverlays( 4135afda2e6Smrg XkbSectionPtr /* section */, 4145afda2e6Smrg int /* first */, 4155afda2e6Smrg int /* count */, 4165afda2e6Smrg Bool /* freeAll */ 4175afda2e6Smrg); 4185afda2e6Smrg 4195afda2e6Smrgextern void 4205afda2e6SmrgXkbFreeGeomKeys( 4215afda2e6Smrg XkbRowPtr /* row */, 4225afda2e6Smrg int /* first */, 4235afda2e6Smrg int /* count */, 4245afda2e6Smrg Bool /* freeAll */ 4255afda2e6Smrg); 4265afda2e6Smrg 4275afda2e6Smrgextern void 4285afda2e6SmrgXkbFreeGeomRows( 4295afda2e6Smrg XkbSectionPtr /* section */, 4305afda2e6Smrg int /* first */, 4315afda2e6Smrg int /* count */, 4325afda2e6Smrg Bool /* freeAll */ 4335afda2e6Smrg); 4345afda2e6Smrg 4355afda2e6Smrgextern void 4365afda2e6SmrgXkbFreeGeomSections( 4375afda2e6Smrg XkbGeometryPtr /* geom */, 4385afda2e6Smrg int /* first */, 4395afda2e6Smrg int /* count */, 4405afda2e6Smrg Bool /* freeAll */ 4415afda2e6Smrg); 4425afda2e6Smrg 4435afda2e6Smrg 4445afda2e6Smrgextern void 4455afda2e6SmrgXkbFreeGeomPoints( 4465afda2e6Smrg XkbOutlinePtr /* outline */, 4475afda2e6Smrg int /* first */, 4485afda2e6Smrg int /* count */, 4495afda2e6Smrg Bool /* freeAll */ 4505afda2e6Smrg); 4515afda2e6Smrg 4525afda2e6Smrgextern void 4535afda2e6SmrgXkbFreeGeomOutlines( 4545afda2e6Smrg XkbShapePtr /* shape */, 4555afda2e6Smrg int /* first */, 4565afda2e6Smrg int /* count */, 4575afda2e6Smrg Bool /* freeAll */ 4585afda2e6Smrg); 4595afda2e6Smrg 4605afda2e6Smrgextern void 4615afda2e6SmrgXkbFreeGeomShapes( 4625afda2e6Smrg XkbGeometryPtr /* geom */, 4635afda2e6Smrg int /* first */, 4645afda2e6Smrg int /* count */, 4655afda2e6Smrg Bool /* freeAll */ 4665afda2e6Smrg); 4675afda2e6Smrg 4685afda2e6Smrgextern void 4695afda2e6SmrgXkbFreeGeometry( 4705afda2e6Smrg XkbGeometryPtr /* geom */, 4715afda2e6Smrg unsigned int /* which */, 4725afda2e6Smrg Bool /* freeMap */ 4735afda2e6Smrg); 4745afda2e6Smrg 4755afda2e6Smrgextern Status 4765afda2e6SmrgXkbAllocGeomProps( 4775afda2e6Smrg XkbGeometryPtr /* geom */, 4785afda2e6Smrg int /* nProps */ 4795afda2e6Smrg); 4805afda2e6Smrg 4815afda2e6Smrgextern Status 4825afda2e6SmrgXkbAllocGeomKeyAliases( 4835afda2e6Smrg XkbGeometryPtr /* geom */, 4845afda2e6Smrg int /* nAliases */ 4855afda2e6Smrg); 4865afda2e6Smrg 4875afda2e6Smrgextern Status 4885afda2e6SmrgXkbAllocGeomColors( 4895afda2e6Smrg XkbGeometryPtr /* geom */, 4905afda2e6Smrg int /* nColors */ 4915afda2e6Smrg); 4925afda2e6Smrg 4935afda2e6Smrgextern Status 4945afda2e6SmrgXkbAllocGeomShapes( 4955afda2e6Smrg XkbGeometryPtr /* geom */, 4965afda2e6Smrg int /* nShapes */ 4975afda2e6Smrg); 4985afda2e6Smrg 4995afda2e6Smrgextern Status 5005afda2e6SmrgXkbAllocGeomSections( 5015afda2e6Smrg XkbGeometryPtr /* geom */, 5025afda2e6Smrg int /* nSections */ 5035afda2e6Smrg); 5045afda2e6Smrg 5055afda2e6Smrgextern Status 5065afda2e6SmrgXkbAllocGeomOverlays( 5075afda2e6Smrg XkbSectionPtr /* section */, 5085afda2e6Smrg int /* num_needed */ 5095afda2e6Smrg); 5105afda2e6Smrg 5115afda2e6Smrgextern Status 5125afda2e6SmrgXkbAllocGeomOverlayRows( 5135afda2e6Smrg XkbOverlayPtr /* overlay */, 5145afda2e6Smrg int /* num_needed */ 5155afda2e6Smrg); 5165afda2e6Smrg 5175afda2e6Smrgextern Status 5185afda2e6SmrgXkbAllocGeomOverlayKeys( 5195afda2e6Smrg XkbOverlayRowPtr /* row */, 5205afda2e6Smrg int /* num_needed */ 5215afda2e6Smrg); 5225afda2e6Smrg 5235afda2e6Smrgextern Status 5245afda2e6SmrgXkbAllocGeomDoodads( 5255afda2e6Smrg XkbGeometryPtr /* geom */, 5265afda2e6Smrg int /* nDoodads */ 5275afda2e6Smrg); 5285afda2e6Smrg 5295afda2e6Smrgextern Status 5305afda2e6SmrgXkbAllocGeomSectionDoodads( 5315afda2e6Smrg XkbSectionPtr /* section */, 5325afda2e6Smrg int /* nDoodads */ 5335afda2e6Smrg); 5345afda2e6Smrg 5355afda2e6Smrgextern Status 5365afda2e6SmrgXkbAllocGeomOutlines( 5375afda2e6Smrg XkbShapePtr /* shape */, 5385afda2e6Smrg int /* nOL */ 5395afda2e6Smrg); 5405afda2e6Smrg 5415afda2e6Smrgextern Status 5425afda2e6SmrgXkbAllocGeomRows( 5435afda2e6Smrg XkbSectionPtr /* section */, 5445afda2e6Smrg int /* nRows */ 5455afda2e6Smrg); 5465afda2e6Smrg 5475afda2e6Smrgextern Status 5485afda2e6SmrgXkbAllocGeomPoints( 5495afda2e6Smrg XkbOutlinePtr /* ol */, 5505afda2e6Smrg int /* nPts */ 5515afda2e6Smrg); 5525afda2e6Smrg 5535afda2e6Smrgextern Status 5545afda2e6SmrgXkbAllocGeomKeys( 5555afda2e6Smrg XkbRowPtr /* row */, 5565afda2e6Smrg int /* nKeys */ 5575afda2e6Smrg); 5585afda2e6Smrg 5595afda2e6Smrgextern Status 5605afda2e6SmrgXkbAllocGeometry( 5615afda2e6Smrg XkbDescPtr /* xkb */, 5625afda2e6Smrg XkbGeometrySizesPtr /* sizes */ 5635afda2e6Smrg); 5645afda2e6Smrg 5655afda2e6Smrgextern Status 5665afda2e6SmrgXkbSetGeometry( 5675afda2e6Smrg Display * /* dpy */, 5685afda2e6Smrg unsigned /* deviceSpec */, 5695afda2e6Smrg XkbGeometryPtr /* geom */ 5705afda2e6Smrg); 5715afda2e6Smrg 5725afda2e6Smrgextern Bool 5735afda2e6SmrgXkbComputeShapeTop( 5745afda2e6Smrg XkbShapePtr /* shape */, 5755afda2e6Smrg XkbBoundsPtr /* bounds */ 5765afda2e6Smrg); 5775afda2e6Smrg 5785afda2e6Smrgextern Bool 5795afda2e6SmrgXkbComputeShapeBounds( 5805afda2e6Smrg XkbShapePtr /* shape */ 5815afda2e6Smrg); 5825afda2e6Smrg 5835afda2e6Smrgextern Bool 5845afda2e6SmrgXkbComputeRowBounds( 5855afda2e6Smrg XkbGeometryPtr /* geom */, 5865afda2e6Smrg XkbSectionPtr /* section */, 5875afda2e6Smrg XkbRowPtr /* row */ 5885afda2e6Smrg); 5895afda2e6Smrg 5905afda2e6Smrgextern Bool 5915afda2e6SmrgXkbComputeSectionBounds( 5925afda2e6Smrg XkbGeometryPtr /* geom */, 5935afda2e6Smrg XkbSectionPtr /* section */ 5945afda2e6Smrg); 5955afda2e6Smrg 5965afda2e6Smrgextern char * 5975afda2e6SmrgXkbFindOverlayForKey( 5985afda2e6Smrg XkbGeometryPtr /* geom */, 5995afda2e6Smrg XkbSectionPtr /* wanted */, 600e9628295Smrg _Xconst char * /* under */ 6015afda2e6Smrg); 6025afda2e6Smrg 6035afda2e6Smrgextern Status 6045afda2e6SmrgXkbGetGeometry( 6055afda2e6Smrg Display * /* dpy */, 6065afda2e6Smrg XkbDescPtr /* xkb */ 6075afda2e6Smrg); 6085afda2e6Smrg 6095afda2e6Smrgextern Status 6105afda2e6SmrgXkbGetNamedGeometry( 6115afda2e6Smrg Display * /* dpy */, 6125afda2e6Smrg XkbDescPtr /* xkb */, 6135afda2e6Smrg Atom /* name */ 6145afda2e6Smrg); 6155afda2e6Smrg 6165afda2e6Smrg_XFUNCPROTOEND 6175afda2e6Smrg 6185afda2e6Smrg#endif /* _XKBSTR_H_ */ 619