Lines Matching defs:offman
309 SendCallFreeBoxCallbacks(FBManagerPtr offman)
311 int i = offman->NumCallbacks;
314 (*offman->FreeBoxesUpdateCallback[i])(
315 offman->pScreen, offman->FreeBoxes, offman->devPrivates[i].ptr);
325 FBManagerPtr offman;
329 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
331 newCallbacks = realloc( offman->FreeBoxesUpdateCallback,
332 sizeof(FreeBoxCallbackProcPtr) * (offman->NumCallbacks + 1));
334 newPrivates = realloc(offman->devPrivates,
335 sizeof(DevUnion) * (offman->NumCallbacks + 1));
340 offman->FreeBoxesUpdateCallback = newCallbacks;
341 offman->devPrivates = newPrivates;
343 offman->FreeBoxesUpdateCallback[offman->NumCallbacks] = FreeBoxCallback;
344 offman->devPrivates[offman->NumCallbacks].ptr = devPriv;
345 offman->NumCallbacks++;
347 SendCallFreeBoxCallbacks(offman);
355 FBManagerPtr offman,
362 ScreenPtr pScreen = offman->pScreen;
371 boxp = RegionRects(offman->FreeBoxes);
372 num = RegionNumRects(offman->FreeBoxes);
387 link->next = offman->UsedAreas;
388 offman->UsedAreas = link;
389 offman->NumUsedAreas++;
395 link = offman->UsedAreas;
416 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &NewReg);
436 RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &NewReg);
452 FBManagerPtr offman;
455 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
457 if((area = AllocateArea(offman, w, h, gran, moveCB, removeCB, privData)))
458 SendCallFreeBoxCallbacks(offman);
467 FBManagerPtr offman;
473 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
475 pLink = offman->UsedAreas;
486 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedRegion);
491 else offman->UsedAreas = pLink->next;
494 offman->NumUsedAreas--;
496 SendCallFreeBoxCallbacks(offman);
506 FBManagerPtr offman;
514 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
517 if(!(pLink = offman->UsedAreas))
547 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
551 SendCallFreeBoxCallbacks(offman);
560 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
565 else offman->UsedAreas = pLink->next;
569 if((area = AllocateArea(offman, w, h, resize->granularity,
577 newLink = offman->UsedAreas;
586 else offman->UsedAreas = newLink->next;
588 pLink->next = offman->UsedAreas;
589 offman->UsedAreas = pLink;
594 offman->NumUsedAreas--;
597 RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
600 pLink->next = offman->UsedAreas;
601 offman->UsedAreas = pLink;
608 SendCallFreeBoxCallbacks(offman);
621 FBManagerPtr offman;
634 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
641 if(offman->NumUsedAreas) {
645 RegionCopy(newRegion, offman->InitialBoxes);
646 pLink = offman->UsedAreas;
662 if(offman->NumUsedAreas) {
666 RegionCopy(newRegion, offman->FreeBoxes);
667 pLink = offman->UsedAreas;
683 nbox = RegionNumRects(offman->FreeBoxes);
684 pbox = RegionRects(offman->FreeBoxes);
735 FBManagerPtr offman;
740 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
742 pLink = offman->UsedAreas;
750 RegionAppend(offman->FreeBoxes, &FreedRegion);
755 else offman->UsedAreas = pLink->next;
760 offman->NumUsedAreas--;
769 RegionValidate(offman->FreeBoxes, &anyUsed);
770 SendCallFreeBoxCallbacks(offman);
785 FBManagerPtr offman;
789 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
791 pLink = offman->LinearAreas;
805 else offman->LinearAreas = pLink->next;
830 FBManagerPtr offman,
835 ScreenPtr pScreen = offman->pScreen;
842 if (!offman->LinearAreas) return NULL;
844 linear = offman->LinearAreas;
897 DumpDebug(offman->LinearAreas);
911 FBManagerPtr offman;
918 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
923 if ((linear = AllocateLinear(offman, length, gran, privData)))
932 extents = RegionExtents(offman->InitialBoxes);
965 link->next = offman->LinearAreas;
966 offman->LinearAreas = link;
980 DumpDebug(offman->LinearAreas);
989 FBManagerPtr offman;
993 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
995 pLink = offman->LinearAreas;
1009 else offman->LinearAreas = pLink->next;
1011 DumpDebug(offman->LinearAreas);
1034 DumpDebug(offman->LinearAreas);
1041 FBManagerPtr offman;
1045 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
1047 pLink = offman->LinearAreas;
1063 extents = RegionExtents(offman->InitialBoxes);
1095 FBManagerPtr offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
1102 pLink = offman->LinearAreas;
1124 FBManagerPtr offman;
1127 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
1129 extents = RegionExtents(offman->InitialBoxes);
1160 FBManagerPtr offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
1163 pScreen->CloseScreen = offman->CloseScreen;
1165 pLink = offman->UsedAreas;
1172 pLinearLink = offman->LinearAreas;
1179 RegionDestroy(offman->InitialBoxes);
1180 RegionDestroy(offman->FreeBoxes);
1182 free(offman->FreeBoxesUpdateCallback);
1183 free(offman->devPrivates);
1184 free(offman);
1324 FBManagerPtr offman;
1335 offman = malloc(sizeof(FBManager));
1336 if(!offman) return FALSE;
1338 dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, offman);
1340 offman->CloseScreen = pScreen->CloseScreen;
1343 offman->InitialBoxes = RegionCreate(NULL, 1);
1344 offman->FreeBoxes = RegionCreate(NULL, 1);
1346 RegionCopy(offman->InitialBoxes, FullRegion);
1347 RegionCopy(offman->FreeBoxes, FullRegion);
1349 offman->pScreen = pScreen;
1350 offman->UsedAreas = NULL;
1351 offman->LinearAreas = NULL;
1352 offman->NumUsedAreas = 0;
1353 offman->NumCallbacks = 0;
1354 offman->FreeBoxesUpdateCallback = NULL;
1355 offman->devPrivates = NULL;
1366 FBManagerPtr offman;
1377 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
1379 offman->LinearAreas = malloc(sizeof(FBLinearLink));
1380 if (!offman->LinearAreas)
1383 link = offman->LinearAreas;
1414 FBManagerPtr offman;
1424 offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
1426 extents = RegionExtents(offman->InitialBoxes);