Lines Matching refs:wxGCPool
157 static wxGC *wxGCPool = NULL;
169 wxGCPool = (wxGC *)malloc(wxGCPoolSize * sizeof(wxGC));
170 if (wxGCPool == NULL)
181 memset(wxGCPool, 0, wxGCPoolSize * sizeof(wxGC));
188 if (wxGCPool[i].m_gc)
189 gdk_gc_unref( wxGCPool[i].m_gc );
192 free(wxGCPool);
193 wxGCPool = NULL;
204 if (!wxGCPool[i].m_gc)
206 wxGCPool[i].m_gc = gdk_gc_new( window );
207 gdk_gc_set_exposures( wxGCPool[i].m_gc, FALSE );
208 wxGCPool[i].m_type = type;
209 wxGCPool[i].m_used = false;
211 if ((!wxGCPool[i].m_used) && (wxGCPool[i].m_type == type))
213 wxGCPool[i].m_used = true;
214 return wxGCPool[i].m_gc;
220 pptr = (wxGC *)realloc(wxGCPool,
225 wxGCPool = pptr;
226 memset(&wxGCPool[wxGCPoolSize], 0,
230 wxGCPool[wxGCPoolSize].m_gc = gdk_gc_new( window );
231 gdk_gc_set_exposures( wxGCPool[wxGCPoolSize].m_gc, FALSE );
232 wxGCPool[wxGCPoolSize].m_type = type;
233 wxGCPool[wxGCPoolSize].m_used = true;
239 return wxGCPool[wxGCPoolSize-GC_POOL_ALLOC_SIZE].m_gc;
252 if (wxGCPool[i].m_gc == gc)
254 wxGCPool[i].m_used = false;