| 1 | /* |
| 2 | * Copyright © 1999 Keith Packard |
| 3 | * |
| 4 | * Permission to use, copy, modify, distribute, and sell this software and its |
| 5 | * documentation for any purpose is hereby granted without fee, provided that |
| 6 | * the above copyright notice appear in all copies and that both that |
| 7 | * copyright notice and this permission notice appear in supporting |
| 8 | * documentation, and that the name of Keith Packard not be used in |
| 9 | * advertising or publicity pertaining to distribution of the software without |
| 10 | * specific, written prior permission. Keith Packard makes no |
| 11 | * representations about the suitability of this software for any purpose. It |
| 12 | * is provided "as is" without express or implied warranty. |
| 13 | * |
| 14 | * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
| 15 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
| 16 | * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 17 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
| 18 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 19 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 20 | * PERFORMANCE OF THIS SOFTWARE. |
| 21 | */ |
| 22 | |
| 23 | #ifndef _KDRIVE_H_ |
| 24 | #define _KDRIVE_H_ |
| 25 | |
| 26 | #include <stdio.h> |
| 27 | #include <string.h> |
| 28 | #include <X11/X.h> |
| 29 | #include <X11/Xproto.h> |
| 30 | #include <X11/Xos.h> |
| 31 | #include "scrnintstr.h" |
| 32 | #include "pixmapstr.h" |
| 33 | #include "windowstr.h" |
| 34 | #include "servermd.h" |
| 35 | #include "colormapst.h" |
| 36 | #include "gcstruct.h" |
| 37 | #include "input.h" |
| 38 | #include "mipointer.h" |
| 39 | #include "mi.h" |
| 40 | #include "dix.h" |
| 41 | #include "fb.h" |
| 42 | #include "fboverlay.h" |
| 43 | #include "shadow.h" |
| 44 | #include "randrstr.h" |
| 45 | #include "globals.h" |
| 46 | |
| 47 | #include "xkbstr.h" |
| 48 | |
| 49 | #define KD_DPMS_NORMAL 0 |
| 50 | #define KD_DPMS_STANDBY 1 |
| 51 | #define KD_DPMS_SUSPEND 2 |
| 52 | #define KD_DPMS_POWERDOWN 3 |
| 53 | #define KD_DPMS_MAX KD_DPMS_POWERDOWN |
| 54 | |
| 55 | #define Status int |
| 56 | |
| 57 | typedef struct _KdCardInfo { |
| 58 | struct _KdCardFuncs *cfuncs; |
| 59 | void *closure; |
| 60 | void *driver; |
| 61 | struct _KdScreenInfo *screenList; |
| 62 | int selected; |
| 63 | struct _KdCardInfo *next; |
| 64 | } KdCardInfo; |
| 65 | |
| 66 | extern KdCardInfo *kdCardInfo; |
| 67 | |
| 68 | /* |
| 69 | * Configuration information per X screen |
| 70 | */ |
| 71 | typedef struct _KdFrameBuffer { |
| 72 | CARD8 *frameBuffer; |
| 73 | int depth; |
| 74 | int bitsPerPixel; |
| 75 | int pixelStride; |
| 76 | int byteStride; |
| 77 | Bool shadow; |
| 78 | unsigned long visuals; |
| 79 | Pixel redMask, greenMask, blueMask; |
| 80 | void *closure; |
| 81 | } KdFrameBuffer; |
| 82 | |
| 83 | #define RR_Rotate_All (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270) |
| 84 | #define RR_Reflect_All (RR_Reflect_X|RR_Reflect_Y) |
| 85 | |
| 86 | typedef struct _KdScreenInfo { |
| 87 | struct _KdScreenInfo *next; |
| 88 | KdCardInfo *card; |
| 89 | ScreenPtr pScreen; |
| 90 | void *driver; |
| 91 | Rotation randr; /* rotation and reflection */ |
| 92 | int width; |
| 93 | int height; |
| 94 | int rate; |
| 95 | int width_mm; |
| 96 | int height_mm; |
| 97 | int subpixel_order; |
| 98 | Bool dumb; |
| 99 | Bool softCursor; |
| 100 | int mynum; |
| 101 | DDXPointRec origin; |
| 102 | KdFrameBuffer fb; |
| 103 | } KdScreenInfo; |
| 104 | |
| 105 | typedef struct _KdCardFuncs { |
| 106 | Bool (*cardinit) (KdCardInfo *); /* detect and map device */ |
| 107 | Bool (*scrinit) (KdScreenInfo *); /* initialize screen information */ |
| 108 | Bool (*initScreen) (ScreenPtr); /* initialize ScreenRec */ |
| 109 | Bool (*finishInitScreen) (ScreenPtr pScreen); |
| 110 | Bool (*createRes) (ScreenPtr); /* create screen resources */ |
| 111 | void (*preserve) (KdCardInfo *); /* save graphics card state */ |
| 112 | Bool (*enable) (ScreenPtr); /* set up for rendering */ |
| 113 | Bool (*dpms) (ScreenPtr, int); /* set DPMS screen saver */ |
| 114 | void (*disable) (ScreenPtr); /* turn off rendering */ |
| 115 | void (*restore) (KdCardInfo *); /* restore graphics card state */ |
| 116 | void (*scrfini) (KdScreenInfo *); /* close down screen */ |
| 117 | void (*cardfini) (KdCardInfo *); /* close down */ |
| 118 | |
| 119 | Bool (*initCursor) (ScreenPtr); /* detect and map cursor */ |
| 120 | void (*enableCursor) (ScreenPtr); /* enable cursor */ |
| 121 | void (*disableCursor) (ScreenPtr); /* disable cursor */ |
| 122 | void (*finiCursor) (ScreenPtr); /* close down */ |
| 123 | void (*recolorCursor) (ScreenPtr, int, xColorItem *); |
| 124 | |
| 125 | Bool (*initAccel) (ScreenPtr); |
| 126 | void (*enableAccel) (ScreenPtr); |
| 127 | void (*disableAccel) (ScreenPtr); |
| 128 | void (*finiAccel) (ScreenPtr); |
| 129 | |
| 130 | void (*getColors) (ScreenPtr, int, xColorItem *); |
| 131 | void (*putColors) (ScreenPtr, int, xColorItem *); |
| 132 | |
| 133 | } KdCardFuncs; |
| 134 | |
| 135 | #define KD_MAX_PSEUDO_DEPTH 8 |
| 136 | #define KD_MAX_PSEUDO_SIZE (1 << KD_MAX_PSEUDO_DEPTH) |
| 137 | |
| 138 | typedef struct { |
| 139 | KdScreenInfo *screen; |
| 140 | KdCardInfo *card; |
| 141 | |
| 142 | Bool enabled; |
| 143 | Bool closed; |
| 144 | int bytesPerPixel; |
| 145 | |
| 146 | int dpmsState; |
| 147 | |
| 148 | ColormapPtr pInstalledmap; /* current colormap */ |
| 149 | xColorItem systemPalette[KD_MAX_PSEUDO_SIZE]; /* saved windows colors */ |
| 150 | |
| 151 | CreateScreenResourcesProcPtr CreateScreenResources; |
| 152 | CloseScreenProcPtr CloseScreen; |
| 153 | } KdPrivScreenRec, *KdPrivScreenPtr; |
| 154 | |
| 155 | typedef enum _kdPointerState { |
| 156 | start, |
| 157 | button_1_pend, |
| 158 | button_1_down, |
| 159 | button_2_down, |
| 160 | button_3_pend, |
| 161 | button_3_down, |
| 162 | synth_2_down_13, |
| 163 | synth_2_down_3, |
| 164 | synth_2_down_1, |
| 165 | num_input_states |
| 166 | } KdPointerState; |
| 167 | |
| 168 | #define KD_MAX_BUTTON 32 |
| 169 | |
| 170 | #define KD_KEYBOARD 1 |
| 171 | #define KD_MOUSE 2 |
| 172 | #define KD_TOUCHSCREEN 3 |
| 173 | |
| 174 | typedef struct _KdPointerInfo KdPointerInfo; |
| 175 | |
| 176 | typedef struct _KdPointerDriver { |
| 177 | const char *name; |
| 178 | Status(*Init) (KdPointerInfo *); |
| 179 | Status(*Enable) (KdPointerInfo *); |
| 180 | void (*Disable) (KdPointerInfo *); |
| 181 | void (*Fini) (KdPointerInfo *); |
| 182 | struct _KdPointerDriver *next; |
| 183 | } KdPointerDriver; |
| 184 | |
| 185 | struct _KdPointerInfo { |
| 186 | DeviceIntPtr dixdev; |
| 187 | char *name; |
| 188 | char *path; |
| 189 | char *protocol; |
| 190 | InputOption *options; |
| 191 | int inputClass; |
| 192 | |
| 193 | CARD8 map[KD_MAX_BUTTON + 1]; |
| 194 | int nButtons; |
| 195 | int nAxes; |
| 196 | |
| 197 | Bool emulateMiddleButton; |
| 198 | unsigned long emulationTimeout; |
| 199 | int emulationDx, emulationDy; |
| 200 | |
| 201 | Bool timeoutPending; |
| 202 | KdPointerState mouseState; |
| 203 | Bool eventHeld; |
| 204 | struct { |
| 205 | int type; |
| 206 | int x; |
| 207 | int y; |
| 208 | int z; |
| 209 | int flags; |
| 210 | int absrel; |
| 211 | } heldEvent; |
| 212 | unsigned char buttonState; |
| 213 | Bool transformCoordinates; |
| 214 | int pressureThreshold; |
| 215 | |
| 216 | KdPointerDriver *driver; |
| 217 | void *driverPrivate; |
| 218 | |
| 219 | struct _KdPointerInfo *next; |
| 220 | }; |
| 221 | |
| 222 | extern int KdCurScreen; |
| 223 | |
| 224 | void KdAddPointerDriver(KdPointerDriver * driver); |
| 225 | void KdRemovePointerDriver(KdPointerDriver * driver); |
| 226 | KdPointerInfo *KdNewPointer(void); |
| 227 | void KdFreePointer(KdPointerInfo *); |
| 228 | int KdAddPointer(KdPointerInfo * ki); |
| 229 | int KdAddConfigPointer(char *pointer); |
| 230 | void KdRemovePointer(KdPointerInfo * ki); |
| 231 | |
| 232 | #define KD_KEY_COUNT 248 |
| 233 | #define KD_MIN_KEYCODE 8 |
| 234 | #define KD_MAX_KEYCODE 255 |
| 235 | #define KD_MAX_WIDTH 4 |
| 236 | #define KD_MAX_LENGTH (KD_MAX_KEYCODE - KD_MIN_KEYCODE + 1) |
| 237 | |
| 238 | typedef struct { |
| 239 | KeySym modsym; |
| 240 | int modbit; |
| 241 | } KdKeySymModsRec; |
| 242 | |
| 243 | typedef struct _KdKeyboardInfo KdKeyboardInfo; |
| 244 | |
| 245 | typedef struct _KdKeyboardDriver { |
| 246 | const char *name; |
| 247 | Bool (*Init) (KdKeyboardInfo *); |
| 248 | Bool (*Enable) (KdKeyboardInfo *); |
| 249 | void (*Leds) (KdKeyboardInfo *, int); |
| 250 | void (*Bell) (KdKeyboardInfo *, int, int, int); |
| 251 | void (*Disable) (KdKeyboardInfo *); |
| 252 | void (*Fini) (KdKeyboardInfo *); |
| 253 | struct _KdKeyboardDriver *next; |
| 254 | } KdKeyboardDriver; |
| 255 | |
| 256 | struct _KdKeyboardInfo { |
| 257 | struct _KdKeyboardInfo *next; |
| 258 | DeviceIntPtr dixdev; |
| 259 | void *closure; |
| 260 | char *name; |
| 261 | char *path; |
| 262 | int inputClass; |
| 263 | char *xkbRules; |
| 264 | char *xkbModel; |
| 265 | char *xkbLayout; |
| 266 | char *xkbVariant; |
| 267 | char *xkbOptions; |
| 268 | int LockLed; |
| 269 | |
| 270 | int minScanCode; |
| 271 | int maxScanCode; |
| 272 | |
| 273 | int leds; |
| 274 | int bellPitch; |
| 275 | int bellDuration; |
| 276 | InputOption *options; |
| 277 | |
| 278 | KdKeyboardDriver *driver; |
| 279 | void *driverPrivate; |
| 280 | }; |
| 281 | |
| 282 | void KdAddKeyboardDriver(KdKeyboardDriver * driver); |
| 283 | void KdRemoveKeyboardDriver(KdKeyboardDriver * driver); |
| 284 | KdKeyboardInfo *KdNewKeyboard(void); |
| 285 | void KdFreeKeyboard(KdKeyboardInfo * ki); |
| 286 | int KdAddConfigKeyboard(char *pointer); |
| 287 | int KdAddKeyboard(KdKeyboardInfo * ki); |
| 288 | void KdRemoveKeyboard(KdKeyboardInfo * ki); |
| 289 | |
| 290 | typedef struct _KdOsFuncs { |
| 291 | int (*Init) (void); |
| 292 | void (*Enable) (void); |
| 293 | Bool (*SpecialKey) (KeySym); |
| 294 | void (*Disable) (void); |
| 295 | void (*Fini) (void); |
| 296 | void (*pollEvents) (void); |
| 297 | void (*Bell) (int, int, int); |
| 298 | } KdOsFuncs; |
| 299 | |
| 300 | typedef enum _KdSyncPolarity { |
| 301 | KdSyncNegative, KdSyncPositive |
| 302 | } KdSyncPolarity; |
| 303 | |
| 304 | typedef struct _KdMonitorTiming { |
| 305 | /* label */ |
| 306 | int horizontal; |
| 307 | int vertical; |
| 308 | int rate; |
| 309 | /* pixel clock */ |
| 310 | int clock; /* in KHz */ |
| 311 | /* horizontal timing */ |
| 312 | int hfp; /* front porch */ |
| 313 | int hbp; /* back porch */ |
| 314 | int hblank; /* blanking */ |
| 315 | KdSyncPolarity hpol; /* polarity */ |
| 316 | /* vertical timing */ |
| 317 | int vfp; /* front porch */ |
| 318 | int vbp; /* back porch */ |
| 319 | int vblank; /* blanking */ |
| 320 | KdSyncPolarity vpol; /* polarity */ |
| 321 | } KdMonitorTiming; |
| 322 | |
| 323 | extern const KdMonitorTiming kdMonitorTimings[]; |
| 324 | extern const int kdNumMonitorTimings; |
| 325 | |
| 326 | typedef struct _KdPointerMatrix { |
| 327 | int matrix[2][3]; |
| 328 | } KdPointerMatrix; |
| 329 | |
| 330 | /* |
| 331 | * This is the only completely portable way to |
| 332 | * compute this info. |
| 333 | */ |
| 334 | |
| 335 | #ifndef BitsPerPixel |
| 336 | #define BitsPerPixel(d) (\ |
| 337 | PixmapWidthPaddingInfo[d].notPower2 ? \ |
| 338 | (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \ |
| 339 | ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \ |
| 340 | (PixmapWidthPaddingInfo[d].padRoundUp+1))) |
| 341 | #endif |
| 342 | |
| 343 | extern DevPrivateKeyRec kdScreenPrivateKeyRec; |
| 344 | |
| 345 | #define kdScreenPrivateKey (&kdScreenPrivateKeyRec) |
| 346 | |
| 347 | extern unsigned long kdGeneration; |
| 348 | extern Bool kdEnabled; |
| 349 | extern Bool kdSwitchPending; |
| 350 | extern Bool kdEmulateMiddleButton; |
| 351 | extern Bool kdDisableZaphod; |
| 352 | extern Bool kdAllowZap; |
| 353 | extern int kdVirtualTerminal; |
| 354 | extern char *kdSwitchCmd; |
| 355 | extern KdOsFuncs *kdOsFuncs; |
| 356 | |
| 357 | #define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \ |
| 358 | dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey)) |
| 359 | #define KdSetScreenPriv(pScreen,v) \ |
| 360 | dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, v) |
| 361 | #define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen) |
| 362 | |
| 363 | /* kcmap.c */ |
| 364 | void |
| 365 | KdSetColormap(ScreenPtr pScreen); |
| 366 | |
| 367 | void |
| 368 | KdEnableColormap(ScreenPtr pScreen); |
| 369 | |
| 370 | void |
| 371 | KdDisableColormap(ScreenPtr pScreen); |
| 372 | |
| 373 | void |
| 374 | KdInstallColormap(ColormapPtr pCmap); |
| 375 | |
| 376 | void |
| 377 | KdUninstallColormap(ColormapPtr pCmap); |
| 378 | |
| 379 | int |
| 380 | KdListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmaps); |
| 381 | |
| 382 | void |
| 383 | KdStoreColors(ColormapPtr pCmap, int ndef, xColorItem * pdefs); |
| 384 | |
| 385 | /* kdrive.c */ |
| 386 | extern miPointerScreenFuncRec kdPointerScreenFuncs; |
| 387 | |
| 388 | void |
| 389 | KdDisableScreen(ScreenPtr pScreen); |
| 390 | |
| 391 | void |
| 392 | KdDisableScreens(void); |
| 393 | |
| 394 | Bool |
| 395 | KdEnableScreen(ScreenPtr pScreen); |
| 396 | |
| 397 | void |
| 398 | KdEnableScreens(void); |
| 399 | |
| 400 | void |
| 401 | KdSuspend(void); |
| 402 | |
| 403 | void |
| 404 | KdResume(void); |
| 405 | |
| 406 | void |
| 407 | KdProcessSwitch(void); |
| 408 | |
| 409 | Rotation KdAddRotation(Rotation a, Rotation b); |
| 410 | |
| 411 | Rotation KdSubRotation(Rotation a, Rotation b); |
| 412 | |
| 413 | void |
| 414 | KdParseScreen(KdScreenInfo * screen, const char *arg); |
| 415 | |
| 416 | KdPointerInfo *KdParsePointer(const char *arg); |
| 417 | |
| 418 | KdKeyboardInfo *KdParseKeyboard(const char *arg); |
| 419 | |
| 420 | const char * |
| 421 | KdParseFindNext(const char *cur, const char *delim, char *save, char *last); |
| 422 | |
| 423 | void |
| 424 | KdParseRgba(char *rgba); |
| 425 | |
| 426 | void |
| 427 | KdUseMsg(void); |
| 428 | |
| 429 | int |
| 430 | KdProcessArgument(int argc, char **argv, int i); |
| 431 | |
| 432 | void |
| 433 | KdOsInit(KdOsFuncs * pOsFuncs); |
| 434 | |
| 435 | void |
| 436 | KdOsAddInputDrivers(void); |
| 437 | |
| 438 | Bool |
| 439 | KdAllocatePrivates(ScreenPtr pScreen); |
| 440 | |
| 441 | Bool |
| 442 | KdCreateScreenResources(ScreenPtr pScreen); |
| 443 | |
| 444 | Bool |
| 445 | KdCloseScreen(ScreenPtr pScreen); |
| 446 | |
| 447 | Bool |
| 448 | KdSaveScreen(ScreenPtr pScreen, int on); |
| 449 | |
| 450 | Bool |
| 451 | KdScreenInit(ScreenPtr pScreen, int argc, char **argv); |
| 452 | |
| 453 | void |
| 454 | |
| 455 | KdInitScreen(ScreenInfo * pScreenInfo, |
| 456 | KdScreenInfo * screen, int argc, char **argv); |
| 457 | |
| 458 | void |
| 459 | KdInitCard(ScreenInfo * pScreenInfo, KdCardInfo * card, int argc, char **argv); |
| 460 | |
| 461 | void |
| 462 | KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv); |
| 463 | |
| 464 | void |
| 465 | KdSetSubpixelOrder(ScreenPtr pScreen, Rotation randr); |
| 466 | |
| 467 | void |
| 468 | KdBacktrace(int signum); |
| 469 | |
| 470 | /* kinfo.c */ |
| 471 | KdCardInfo *KdCardInfoAdd(KdCardFuncs * funcs, void *closure); |
| 472 | |
| 473 | KdCardInfo *KdCardInfoLast(void); |
| 474 | |
| 475 | void |
| 476 | KdCardInfoDispose(KdCardInfo * ci); |
| 477 | |
| 478 | KdScreenInfo *KdScreenInfoAdd(KdCardInfo * ci); |
| 479 | |
| 480 | void |
| 481 | KdScreenInfoDispose(KdScreenInfo * si); |
| 482 | |
| 483 | /* kinput.c */ |
| 484 | void |
| 485 | KdInitInput(void); |
| 486 | void |
| 487 | KdCloseInput(void); |
| 488 | |
| 489 | Bool |
| 490 | KdRegisterFd(int fd, void (*read) (int fd, void *closure), void *closure); |
| 491 | |
| 492 | void |
| 493 | KdUnregisterFds(void *closure, Bool do_close); |
| 494 | |
| 495 | void |
| 496 | KdUnregisterFd(void *closure, int fd, Bool do_close); |
| 497 | |
| 498 | void |
| 499 | |
| 500 | KdEnqueueKeyboardEvent(KdKeyboardInfo * ki, unsigned char scan_code, |
| 501 | unsigned char is_up); |
| 502 | |
| 503 | #define KD_BUTTON_1 0x01 |
| 504 | #define KD_BUTTON_2 0x02 |
| 505 | #define KD_BUTTON_3 0x04 |
| 506 | #define KD_BUTTON_4 0x08 |
| 507 | #define KD_BUTTON_5 0x10 |
| 508 | #define KD_BUTTON_8 0x80 |
| 509 | #define KD_POINTER_DESKTOP 0x40000000 |
| 510 | #define KD_MOUSE_DELTA 0x80000000 |
| 511 | |
| 512 | void |
| 513 | |
| 514 | KdEnqueuePointerEvent(KdPointerInfo * pi, unsigned long flags, int rx, int ry, |
| 515 | int rz); |
| 516 | |
| 517 | void |
| 518 | |
| 519 | _KdEnqueuePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z, |
| 520 | int b, int absrel, Bool force); |
| 521 | |
| 522 | void |
| 523 | KdReleaseAllKeys(void); |
| 524 | |
| 525 | void |
| 526 | KdSetLed(KdKeyboardInfo * ki, int led, Bool on); |
| 527 | |
| 528 | void |
| 529 | KdSetPointerMatrix(KdPointerMatrix * pointer); |
| 530 | |
| 531 | void |
| 532 | |
| 533 | KdComputePointerMatrix(KdPointerMatrix * pointer, Rotation randr, int width, |
| 534 | int height); |
| 535 | |
| 536 | void |
| 537 | KdScreenToPointerCoords(int *x, int *y); |
| 538 | |
| 539 | void |
| 540 | |
| 541 | KdBlockHandler(ScreenPtr pScreen, pointer timeout, pointer readmask); |
| 542 | |
| 543 | void |
| 544 | |
| 545 | KdWakeupHandler(ScreenPtr pScreen, unsigned long result, pointer readmask); |
| 546 | |
| 547 | void |
| 548 | KdDisableInput(void); |
| 549 | |
| 550 | void |
| 551 | KdEnableInput(void); |
| 552 | |
| 553 | void |
| 554 | KdRingBell(KdKeyboardInfo * ki, int volume, int pitch, int duration); |
| 555 | |
| 556 | /* kmode.c */ |
| 557 | const KdMonitorTiming *KdFindMode(KdScreenInfo * screen, |
| 558 | Bool (*supported) (KdScreenInfo *, |
| 559 | const KdMonitorTiming *)); |
| 560 | |
| 561 | Bool |
| 562 | |
| 563 | KdTuneMode(KdScreenInfo * screen, |
| 564 | Bool (*usable) (KdScreenInfo *), |
| 565 | Bool (*supported) (KdScreenInfo *, const KdMonitorTiming *)); |
| 566 | |
| 567 | #ifdef RANDR |
| 568 | Bool |
| 569 | |
| 570 | KdRandRGetInfo(ScreenPtr pScreen, |
| 571 | int randr, |
| 572 | Bool (*supported) (ScreenPtr pScreen, const KdMonitorTiming *)); |
| 573 | |
| 574 | const KdMonitorTiming *KdRandRGetTiming(ScreenPtr pScreen, |
| 575 | Bool (*supported) (ScreenPtr pScreen, |
| 576 | const KdMonitorTiming |
| 577 | *), int rate, |
| 578 | RRScreenSizePtr pSize); |
| 579 | #endif |
| 580 | |
| 581 | /* kshadow.c */ |
| 582 | Bool |
| 583 | KdShadowFbAlloc(KdScreenInfo * screen, Bool rotate); |
| 584 | |
| 585 | void |
| 586 | KdShadowFbFree(KdScreenInfo * screen); |
| 587 | |
| 588 | Bool |
| 589 | |
| 590 | KdShadowSet(ScreenPtr pScreen, int randr, ShadowUpdateProc update, |
| 591 | ShadowWindowProc window); |
| 592 | |
| 593 | void |
| 594 | KdShadowUnset(ScreenPtr pScreen); |
| 595 | |
| 596 | /* function prototypes to be implemented by the drivers */ |
| 597 | void |
| 598 | InitCard(char *name); |
| 599 | |
| 600 | #endif /* _KDRIVE_H_ */ |