Lines Matching defs:offman

298 SendCallFreeBoxCallbacks(FBManagerPtr offman)
300 int i = offman->NumCallbacks;
303 (*offman->FreeBoxesUpdateCallback[i]) (offman->pScreen,
304 offman->FreeBoxes,
305 offman->devPrivates[i].ptr);
314 FBManagerPtr offman;
318 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
320 newCallbacks = reallocarray(offman->FreeBoxesUpdateCallback,
321 offman->NumCallbacks + 1,
326 offman->FreeBoxesUpdateCallback = newCallbacks;
328 newPrivates = reallocarray(offman->devPrivates,
329 offman->NumCallbacks + 1,
334 offman->devPrivates = newPrivates;
336 offman->FreeBoxesUpdateCallback[offman->NumCallbacks] = FreeBoxCallback;
337 offman->devPrivates[offman->NumCallbacks].ptr = devPriv;
338 offman->NumCallbacks++;
340 SendCallFreeBoxCallbacks(offman);
346 AllocateArea(FBManagerPtr offman,
352 ScreenPtr pScreen = offman->pScreen;
362 boxp = RegionRects(offman->FreeBoxes);
363 num = RegionNumRects(offman->FreeBoxes);
379 link->next = offman->UsedAreas;
380 offman->UsedAreas = link;
381 offman->NumUsedAreas++;
387 link = offman->UsedAreas;
408 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &NewReg);
428 RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &NewReg);
442 FBManagerPtr offman;
445 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
447 if ((area = AllocateArea(offman, w, h, gran, moveCB, removeCB, privData)))
448 SendCallFreeBoxCallbacks(offman);
456 FBManagerPtr offman;
462 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
464 pLink = offman->UsedAreas;
477 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedRegion);
483 offman->UsedAreas = pLink->next;
486 offman->NumUsedAreas--;
488 SendCallFreeBoxCallbacks(offman);
494 FBManagerPtr offman;
502 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
505 if (!(pLink = offman->UsedAreas))
535 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
539 SendCallFreeBoxCallbacks(offman);
547 RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
553 offman->UsedAreas = pLink->next;
557 if ((area = AllocateArea(offman, w, h, resize->granularity,
566 newLink = offman->UsedAreas;
576 offman->UsedAreas = newLink->next;
578 pLink->next = offman->UsedAreas;
579 offman->UsedAreas = pLink;
584 offman->NumUsedAreas--;
588 RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
591 pLink->next = offman->UsedAreas;
592 offman->UsedAreas = pLink;
598 SendCallFreeBoxCallbacks(offman);
608 FBManagerPtr offman;
622 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
631 if (offman->NumUsedAreas) {
636 RegionCopy(newRegion, offman->InitialBoxes);
637 pLink = offman->UsedAreas;
653 if (offman->NumUsedAreas) {
658 RegionCopy(newRegion, offman->FreeBoxes);
659 pLink = offman->UsedAreas;
675 nbox = RegionNumRects(offman->FreeBoxes);
676 pbox = RegionRects(offman->FreeBoxes);
728 FBManagerPtr offman;
733 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
735 pLink = offman->UsedAreas;
744 RegionAppend(offman->FreeBoxes, &FreedRegion);
750 offman->UsedAreas = pLink->next;
755 offman->NumUsedAreas--;
765 RegionValidate(offman->FreeBoxes, &anyUsed);
766 SendCallFreeBoxCallbacks(offman);
781 FBManagerPtr offman;
785 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
787 pLink = offman->LinearAreas;
804 offman->LinearAreas = pLink->next;
828 AllocateLinear(FBManagerPtr offman, int size, int granularity, void *privData)
830 ScreenPtr pScreen = offman->pScreen;
838 if (!offman->LinearAreas)
841 linear = offman->LinearAreas;
896 DumpDebug(offman->LinearAreas);
909 FBManagerPtr offman;
916 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
921 if ((linear = AllocateLinear(offman, length, gran, privData)))
930 extents = RegionExtents(offman->InitialBoxes);
963 link->next = offman->LinearAreas;
964 offman->LinearAreas = link;
979 DumpDebug(offman->LinearAreas);
987 FBManagerPtr offman;
991 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
993 pLink = offman->LinearAreas;
1010 offman->LinearAreas = pLink->next;
1012 DumpDebug(offman->LinearAreas);
1037 DumpDebug(offman->LinearAreas);
1043 FBManagerPtr offman;
1047 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
1049 pLink = offman->LinearAreas;
1067 extents = RegionExtents(offman->InitialBoxes);
1097 FBManagerPtr offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
1104 pLink = offman->LinearAreas;
1128 extents = RegionExtents(offman->InitialBoxes);
1156 FBManagerPtr offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
1159 pScreen->CloseScreen = offman->CloseScreen;
1161 pLink = offman->UsedAreas;
1168 pLinearLink = offman->LinearAreas;
1175 RegionDestroy(offman->InitialBoxes);
1176 RegionDestroy(offman->FreeBoxes);
1178 free(offman->FreeBoxesUpdateCallback);
1179 free(offman->devPrivates);
1180 free(offman);
1312 FBManagerPtr offman;
1323 offman = malloc(sizeof(FBManager));
1324 if (!offman)
1327 dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, offman);
1329 offman->CloseScreen = pScreen->CloseScreen;
1332 offman->InitialBoxes = RegionCreate(NULL, 1);
1333 offman->FreeBoxes = RegionCreate(NULL, 1);
1335 RegionCopy(offman->InitialBoxes, FullRegion);
1336 RegionCopy(offman->FreeBoxes, FullRegion);
1338 offman->pScreen = pScreen;
1339 offman->UsedAreas = NULL;
1340 offman->LinearAreas = NULL;
1341 offman->NumUsedAreas = 0;
1342 offman->NumCallbacks = 0;
1343 offman->FreeBoxesUpdateCallback = NULL;
1344 offman->devPrivates = NULL;
1352 FBManagerPtr offman;
1363 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
1365 offman->LinearAreas = malloc(sizeof(FBLinearLink));
1366 if (!offman->LinearAreas)
1369 link = offman->LinearAreas;
1398 FBManagerPtr offman;
1408 offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
1410 extents = RegionExtents(offman->InitialBoxes);