The C and C++ Include Header Files
/usr/include/X11/extensions/XKBgeom.h
$ cat -n /usr/include/X11/extensions/XKBgeom.h 1 /************************************************************ 2 Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 3 4 Permission to use, copy, modify, and distribute this 5 software and its documentation for any purpose and without 6 fee is hereby granted, provided that the above copyright 7 notice appear in all copies and that both that copyright 8 notice and this permission notice appear in supporting 9 documentation, and that the name of Silicon Graphics not be 10 used in advertising or publicity pertaining to distribution 11 of the software without specific prior written permission. 12 Silicon Graphics makes no representation about the suitability 13 of this software for any purpose. It is provided "as is" 14 without any express or implied warranty. 15 16 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 17 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 18 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 19 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 20 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 21 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 22 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 23 THE USE OR PERFORMANCE OF THIS SOFTWARE. 24 25 ********************************************************/ 26 27 #ifndef _XKBGEOM_H_ 28 #define _XKBGEOM_H_ 29 30 #include
31 32 typedef struct _XkbProperty { 33 char *name; 34 char *value; 35 } XkbPropertyRec,*XkbPropertyPtr; 36 37 typedef struct _XkbColor { 38 unsigned int pixel; 39 char * spec; 40 } XkbColorRec,*XkbColorPtr; 41 42 typedef struct _XkbPoint { 43 short x; 44 short y; 45 } XkbPointRec, *XkbPointPtr; 46 47 typedef struct _XkbBounds { 48 short x1,y1; 49 short x2,y2; 50 } XkbBoundsRec, *XkbBoundsPtr; 51 #define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) 52 #define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) 53 54 /* 55 * In the following structs, this pattern is used for dynamically sized arrays: 56 * foo is an array for which sz_foo entries are allocated & num_foo are used 57 */ 58 59 typedef struct _XkbOutline { 60 unsigned short num_points; 61 unsigned short sz_points; 62 unsigned short corner_radius; 63 XkbPointPtr points; 64 } XkbOutlineRec, *XkbOutlinePtr; 65 66 typedef struct _XkbShape { 67 Atom name; 68 unsigned short num_outlines; 69 unsigned short sz_outlines; 70 XkbOutlinePtr outlines; 71 XkbOutlinePtr approx; 72 XkbOutlinePtr primary; 73 XkbBoundsRec bounds; 74 } XkbShapeRec, *XkbShapePtr; 75 #define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) 76 77 typedef struct _XkbShapeDoodad { 78 Atom name; 79 unsigned char type; 80 unsigned char priority; 81 short top; 82 short left; 83 short angle; 84 unsigned short color_ndx; 85 unsigned short shape_ndx; 86 } XkbShapeDoodadRec, *XkbShapeDoodadPtr; 87 #define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) 88 #define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) 89 #define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) 90 #define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) 91 92 typedef struct _XkbTextDoodad { 93 Atom name; 94 unsigned char type; 95 unsigned char priority; 96 short top; 97 short left; 98 short angle; 99 short width; 100 short height; 101 unsigned short color_ndx; 102 char * text; 103 char * font; 104 } XkbTextDoodadRec, *XkbTextDoodadPtr; 105 #define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) 106 #define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) 107 108 typedef struct _XkbIndicatorDoodad { 109 Atom name; 110 unsigned char type; 111 unsigned char priority; 112 short top; 113 short left; 114 short angle; 115 unsigned short shape_ndx; 116 unsigned short on_color_ndx; 117 unsigned short off_color_ndx; 118 } XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr; 119 #define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) 120 #define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) 121 #define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) 122 #define XkbSetIndicatorDoodadOnColor(g,d,c) \ 123 ((d)->on_color_ndx= (c)-&(g)->colors[0]) 124 #define XkbSetIndicatorDoodadOffColor(g,d,c) \ 125 ((d)->off_color_ndx= (c)-&(g)->colors[0]) 126 #define XkbSetIndicatorDoodadShape(g,d,s) \ 127 ((d)->shape_ndx= (s)-&(g)->shapes[0]) 128 129 typedef struct _XkbLogoDoodad { 130 Atom name; 131 unsigned char type; 132 unsigned char priority; 133 short top; 134 short left; 135 short angle; 136 unsigned short color_ndx; 137 unsigned short shape_ndx; 138 char * logo_name; 139 } XkbLogoDoodadRec, *XkbLogoDoodadPtr; 140 #define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) 141 #define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) 142 #define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) 143 #define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) 144 145 typedef struct _XkbAnyDoodad { 146 Atom name; 147 unsigned char type; 148 unsigned char priority; 149 short top; 150 short left; 151 short angle; 152 } XkbAnyDoodadRec, *XkbAnyDoodadPtr; 153 154 typedef union _XkbDoodad { 155 XkbAnyDoodadRec any; 156 XkbShapeDoodadRec shape; 157 XkbTextDoodadRec text; 158 XkbIndicatorDoodadRec indicator; 159 XkbLogoDoodadRec logo; 160 } XkbDoodadRec, *XkbDoodadPtr; 161 162 #define XkbUnknownDoodad 0 163 #define XkbOutlineDoodad 1 164 #define XkbSolidDoodad 2 165 #define XkbTextDoodad 3 166 #define XkbIndicatorDoodad 4 167 #define XkbLogoDoodad 5 168 169 typedef struct _XkbKey { 170 XkbKeyNameRec name; 171 short gap; 172 unsigned char shape_ndx; 173 unsigned char color_ndx; 174 } XkbKeyRec, *XkbKeyPtr; 175 #define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) 176 #define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) 177 #define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) 178 #define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) 179 180 typedef struct _XkbRow { 181 short top; 182 short left; 183 unsigned short num_keys; 184 unsigned short sz_keys; 185 int vertical; 186 XkbKeyPtr keys; 187 XkbBoundsRec bounds; 188 } XkbRowRec, *XkbRowPtr; 189 190 typedef struct _XkbSection { 191 Atom name; 192 unsigned char priority; 193 short top; 194 short left; 195 unsigned short width; 196 unsigned short height; 197 short angle; 198 unsigned short num_rows; 199 unsigned short num_doodads; 200 unsigned short num_overlays; 201 unsigned short sz_rows; 202 unsigned short sz_doodads; 203 unsigned short sz_overlays; 204 XkbRowPtr rows; 205 XkbDoodadPtr doodads; 206 XkbBoundsRec bounds; 207 struct _XkbOverlay *overlays; 208 } XkbSectionRec, *XkbSectionPtr; 209 210 typedef struct _XkbOverlayKey { 211 XkbKeyNameRec over; 212 XkbKeyNameRec under; 213 } XkbOverlayKeyRec,*XkbOverlayKeyPtr; 214 215 typedef struct _XkbOverlayRow { 216 unsigned short row_under; 217 unsigned short num_keys; 218 unsigned short sz_keys; 219 XkbOverlayKeyPtr keys; 220 } XkbOverlayRowRec,*XkbOverlayRowPtr; 221 222 typedef struct _XkbOverlay { 223 Atom name; 224 XkbSectionPtr section_under; 225 unsigned short num_rows; 226 unsigned short sz_rows; 227 XkbOverlayRowPtr rows; 228 XkbBoundsPtr bounds; 229 } XkbOverlayRec,*XkbOverlayPtr; 230 231 typedef struct _XkbGeometry { 232 Atom name; 233 unsigned short width_mm; 234 unsigned short height_mm; 235 char * label_font; 236 XkbColorPtr label_color; 237 XkbColorPtr base_color; 238 unsigned short sz_properties; 239 unsigned short sz_colors; 240 unsigned short sz_shapes; 241 unsigned short sz_sections; 242 unsigned short sz_doodads; 243 unsigned short sz_key_aliases; 244 unsigned short num_properties; 245 unsigned short num_colors; 246 unsigned short num_shapes; 247 unsigned short num_sections; 248 unsigned short num_doodads; 249 unsigned short num_key_aliases; 250 XkbPropertyPtr properties; 251 XkbColorPtr colors; 252 XkbShapePtr shapes; 253 XkbSectionPtr sections; 254 XkbDoodadPtr doodads; 255 XkbKeyAliasPtr key_aliases; 256 } XkbGeometryRec; 257 #define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) 258 259 #define XkbGeomPropertiesMask (1<<0) 260 #define XkbGeomColorsMask (1<<1) 261 #define XkbGeomShapesMask (1<<2) 262 #define XkbGeomSectionsMask (1<<3) 263 #define XkbGeomDoodadsMask (1<<4) 264 #define XkbGeomKeyAliasesMask (1<<5) 265 #define XkbGeomAllMask (0x3f) 266 267 typedef struct _XkbGeometrySizes { 268 unsigned int which; 269 unsigned short num_properties; 270 unsigned short num_colors; 271 unsigned short num_shapes; 272 unsigned short num_sections; 273 unsigned short num_doodads; 274 unsigned short num_key_aliases; 275 } XkbGeometrySizesRec,*XkbGeometrySizesPtr; 276 277 _XFUNCPROTOBEGIN 278 279 extern XkbPropertyPtr 280 XkbAddGeomProperty( 281 XkbGeometryPtr /* geom */, 282 _Xconst char * /* name */, 283 _Xconst char * /* value */ 284 ); 285 286 extern XkbKeyAliasPtr 287 XkbAddGeomKeyAlias( 288 XkbGeometryPtr /* geom */, 289 _Xconst char * /* alias */, 290 _Xconst char * /* real */ 291 ); 292 293 extern XkbColorPtr 294 XkbAddGeomColor( 295 XkbGeometryPtr /* geom */, 296 _Xconst char * /* spec */, 297 unsigned int /* pixel */ 298 ); 299 300 extern XkbOutlinePtr 301 XkbAddGeomOutline( 302 XkbShapePtr /* shape */, 303 int /* sz_points */ 304 ); 305 306 extern XkbShapePtr 307 XkbAddGeomShape( 308 XkbGeometryPtr /* geom */, 309 Atom /* name */, 310 int /* sz_outlines */ 311 ); 312 313 extern XkbKeyPtr 314 XkbAddGeomKey( 315 XkbRowPtr /* row */ 316 ); 317 318 extern XkbRowPtr 319 XkbAddGeomRow( 320 XkbSectionPtr /* section */, 321 int /* sz_keys */ 322 ); 323 324 extern XkbSectionPtr 325 XkbAddGeomSection( 326 XkbGeometryPtr /* geom */, 327 Atom /* name */, 328 int /* sz_rows */, 329 int /* sz_doodads */, 330 int /* sz_overlays */ 331 ); 332 333 extern XkbOverlayPtr 334 XkbAddGeomOverlay( 335 XkbSectionPtr /* section */, 336 Atom /* name */, 337 int /* sz_rows */ 338 ); 339 340 extern XkbOverlayRowPtr 341 XkbAddGeomOverlayRow( 342 XkbOverlayPtr /* overlay */, 343 int /* row_under */, 344 int /* sz_keys */ 345 ); 346 347 extern XkbOverlayKeyPtr 348 XkbAddGeomOverlayKey( 349 XkbOverlayPtr /* overlay */, 350 XkbOverlayRowPtr /* row */, 351 _Xconst char * /* over */, 352 _Xconst char * /* under */ 353 ); 354 355 extern XkbDoodadPtr 356 XkbAddGeomDoodad( 357 XkbGeometryPtr /* geom */, 358 XkbSectionPtr /* section */, 359 Atom /* name */ 360 ); 361 362 363 extern void 364 XkbFreeGeomKeyAliases( 365 XkbGeometryPtr /* geom */, 366 int /* first */, 367 int /* count */, 368 Bool /* freeAll */ 369 ); 370 371 extern void 372 XkbFreeGeomColors( 373 XkbGeometryPtr /* geom */, 374 int /* first */, 375 int /* count */, 376 Bool /* freeAll */ 377 ); 378 379 extern void 380 XkbFreeGeomDoodads( 381 XkbDoodadPtr /* doodads */, 382 int /* nDoodads */, 383 Bool /* freeAll */ 384 ); 385 386 387 extern void 388 XkbFreeGeomProperties( 389 XkbGeometryPtr /* geom */, 390 int /* first */, 391 int /* count */, 392 Bool /* freeAll */ 393 ); 394 395 extern void 396 XkbFreeGeomOverlayKeys( 397 XkbOverlayRowPtr /* row */, 398 int /* first */, 399 int /* count */, 400 Bool /* freeAll */ 401 ); 402 403 extern void 404 XkbFreeGeomOverlayRows( 405 XkbOverlayPtr /* overlay */, 406 int /* first */, 407 int /* count */, 408 Bool /* freeAll */ 409 ); 410 411 extern void 412 XkbFreeGeomOverlays( 413 XkbSectionPtr /* section */, 414 int /* first */, 415 int /* count */, 416 Bool /* freeAll */ 417 ); 418 419 extern void 420 XkbFreeGeomKeys( 421 XkbRowPtr /* row */, 422 int /* first */, 423 int /* count */, 424 Bool /* freeAll */ 425 ); 426 427 extern void 428 XkbFreeGeomRows( 429 XkbSectionPtr /* section */, 430 int /* first */, 431 int /* count */, 432 Bool /* freeAll */ 433 ); 434 435 extern void 436 XkbFreeGeomSections( 437 XkbGeometryPtr /* geom */, 438 int /* first */, 439 int /* count */, 440 Bool /* freeAll */ 441 ); 442 443 444 extern void 445 XkbFreeGeomPoints( 446 XkbOutlinePtr /* outline */, 447 int /* first */, 448 int /* count */, 449 Bool /* freeAll */ 450 ); 451 452 extern void 453 XkbFreeGeomOutlines( 454 XkbShapePtr /* shape */, 455 int /* first */, 456 int /* count */, 457 Bool /* freeAll */ 458 ); 459 460 extern void 461 XkbFreeGeomShapes( 462 XkbGeometryPtr /* geom */, 463 int /* first */, 464 int /* count */, 465 Bool /* freeAll */ 466 ); 467 468 extern void 469 XkbFreeGeometry( 470 XkbGeometryPtr /* geom */, 471 unsigned int /* which */, 472 Bool /* freeMap */ 473 ); 474 475 extern Status 476 XkbAllocGeomProps( 477 XkbGeometryPtr /* geom */, 478 int /* nProps */ 479 ); 480 481 extern Status 482 XkbAllocGeomKeyAliases( 483 XkbGeometryPtr /* geom */, 484 int /* nAliases */ 485 ); 486 487 extern Status 488 XkbAllocGeomColors( 489 XkbGeometryPtr /* geom */, 490 int /* nColors */ 491 ); 492 493 extern Status 494 XkbAllocGeomShapes( 495 XkbGeometryPtr /* geom */, 496 int /* nShapes */ 497 ); 498 499 extern Status 500 XkbAllocGeomSections( 501 XkbGeometryPtr /* geom */, 502 int /* nSections */ 503 ); 504 505 extern Status 506 XkbAllocGeomOverlays( 507 XkbSectionPtr /* section */, 508 int /* num_needed */ 509 ); 510 511 extern Status 512 XkbAllocGeomOverlayRows( 513 XkbOverlayPtr /* overlay */, 514 int /* num_needed */ 515 ); 516 517 extern Status 518 XkbAllocGeomOverlayKeys( 519 XkbOverlayRowPtr /* row */, 520 int /* num_needed */ 521 ); 522 523 extern Status 524 XkbAllocGeomDoodads( 525 XkbGeometryPtr /* geom */, 526 int /* nDoodads */ 527 ); 528 529 extern Status 530 XkbAllocGeomSectionDoodads( 531 XkbSectionPtr /* section */, 532 int /* nDoodads */ 533 ); 534 535 extern Status 536 XkbAllocGeomOutlines( 537 XkbShapePtr /* shape */, 538 int /* nOL */ 539 ); 540 541 extern Status 542 XkbAllocGeomRows( 543 XkbSectionPtr /* section */, 544 int /* nRows */ 545 ); 546 547 extern Status 548 XkbAllocGeomPoints( 549 XkbOutlinePtr /* ol */, 550 int /* nPts */ 551 ); 552 553 extern Status 554 XkbAllocGeomKeys( 555 XkbRowPtr /* row */, 556 int /* nKeys */ 557 ); 558 559 extern Status 560 XkbAllocGeometry( 561 XkbDescPtr /* xkb */, 562 XkbGeometrySizesPtr /* sizes */ 563 ); 564 565 extern Status 566 XkbSetGeometry( 567 Display * /* dpy */, 568 unsigned /* deviceSpec */, 569 XkbGeometryPtr /* geom */ 570 ); 571 572 extern Bool 573 XkbComputeShapeTop( 574 XkbShapePtr /* shape */, 575 XkbBoundsPtr /* bounds */ 576 ); 577 578 extern Bool 579 XkbComputeShapeBounds( 580 XkbShapePtr /* shape */ 581 ); 582 583 extern Bool 584 XkbComputeRowBounds( 585 XkbGeometryPtr /* geom */, 586 XkbSectionPtr /* section */, 587 XkbRowPtr /* row */ 588 ); 589 590 extern Bool 591 XkbComputeSectionBounds( 592 XkbGeometryPtr /* geom */, 593 XkbSectionPtr /* section */ 594 ); 595 596 extern char * 597 XkbFindOverlayForKey( 598 XkbGeometryPtr /* geom */, 599 XkbSectionPtr /* wanted */, 600 _Xconst char * /* under */ 601 ); 602 603 extern Status 604 XkbGetGeometry( 605 Display * /* dpy */, 606 XkbDescPtr /* xkb */ 607 ); 608 609 extern Status 610 XkbGetNamedGeometry( 611 Display * /* dpy */, 612 XkbDescPtr /* xkb */, 613 Atom /* name */ 614 ); 615 616 _XFUNCPROTOEND 617 618 #endif /* _XKBSTR_H_ */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2024 MyWebUniversity.com ™