Lines Matching defs:g_contexts
226 } g_contexts[CLIP_MAX_CONTEXTS];
235 for (unsigned i = 0; i < RT_ELEMENTS(g_contexts); ++i)
237 AssertReturn( (g_contexts[i].widget != widget)
238 && (g_contexts[i].pCtx != pCtx), VERR_WRONG_ORDER);
239 if (g_contexts[i].widget == NULL && !found)
241 AssertReturn(g_contexts[i].pCtx == NULL, VERR_INTERNAL_ERROR);
242 g_contexts[i].widget = widget;
243 g_contexts[i].pCtx = pCtx;
257 for (unsigned i = 0; i < RT_ELEMENTS(g_contexts); ++i)
259 Assert(!found || g_contexts[i].widget != widget);
260 if (g_contexts[i].widget == widget)
262 Assert(g_contexts[i].pCtx != NULL);
263 g_contexts[i].widget = NULL;
264 g_contexts[i].pCtx = NULL;
274 for (unsigned i = 0; i < RT_ELEMENTS(g_contexts); ++i)
276 if (g_contexts[i].widget == widget)
278 Assert(g_contexts[i].pCtx != NULL);
279 return g_contexts[i].pCtx;