Lines Matching refs:wxGCPool
146 static wxGC *wxGCPool = NULL;
158 wxGCPool = (wxGC *)malloc(wxGCPoolSize * sizeof(wxGC));
159 if (wxGCPool == NULL)
170 memset(wxGCPool, 0, wxGCPoolSize * sizeof(wxGC));
177 if (wxGCPool[i].m_gc)
178 g_object_unref (wxGCPool[i].m_gc);
181 free(wxGCPool);
182 wxGCPool = NULL;
193 if (!wxGCPool[i].m_gc)
195 wxGCPool[i].m_gc = gdk_gc_new( window );
196 gdk_gc_set_exposures( wxGCPool[i].m_gc, FALSE );
197 wxGCPool[i].m_type = type;
198 wxGCPool[i].m_used = false;
200 if ((!wxGCPool[i].m_used) && (wxGCPool[i].m_type == type))
202 wxGCPool[i].m_used = true;
203 return wxGCPool[i].m_gc;
209 pptr = (wxGC *)realloc(wxGCPool,
214 wxGCPool = pptr;
215 memset(&wxGCPool[wxGCPoolSize], 0,
219 wxGCPool[wxGCPoolSize].m_gc = gdk_gc_new( window );
220 gdk_gc_set_exposures( wxGCPool[wxGCPoolSize].m_gc, FALSE );
221 wxGCPool[wxGCPoolSize].m_type = type;
222 wxGCPool[wxGCPoolSize].m_used = true;
228 return wxGCPool[wxGCPoolSize-GC_POOL_ALLOC_SIZE].m_gc;
241 if (wxGCPool[i].m_gc == gc)
243 wxGCPool[i].m_used = false;