~ubuntu-dev/wxwidgets2.6/upstream-debian

« back to all changes in this revision

Viewing changes to src/msw/gdiobj.cpp

  • Committer: Daniel T Chen
  • Date: 2006-06-26 10:15:11 UTC
  • Revision ID: crimsun@ubuntu.com-20060626101511-a4436cec4c6d9b35
ImportĀ DebianĀ 2.6.3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        gdiobj.cpp
 
3
// Purpose:     wxGDIObject class
 
4
// Author:      Julian Smart
 
5
// Modified by:
 
6
// Created:     01/02/97
 
7
// RCS-ID:      $Id: gdiobj.cpp,v 1.10 2004/08/26 08:46:18 ABX Exp $
 
8
// Copyright:   (c) Julian Smart
 
9
// Licence:     wxWindows licence
 
10
/////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 
13
#pragma implementation "gdiobj.h"
 
14
#endif
 
15
 
 
16
// For compilers that support precompilation, includes "wx.h".
 
17
#include "wx/wxprec.h"
 
18
 
 
19
#ifdef __BORLANDC__
 
20
#pragma hdrstop
 
21
#endif
 
22
 
 
23
#ifndef WX_PRECOMP
 
24
#include <stdio.h>
 
25
#include "wx/setup.h"
 
26
#include "wx/list.h"
 
27
#include "wx/utils.h"
 
28
#include "wx/app.h"
 
29
#endif
 
30
 
 
31
#include "wx/gdiobj.h"
 
32
#include "wx/msw/private.h"
 
33
 
 
34
IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject)
 
35
 
 
36
/*
 
37
void wxGDIObject::IncrementResourceUsage(void)
 
38
{
 
39
    if ( !M_GDIDATA )
 
40
        return;
 
41
 
 
42
//  wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
 
43
  M_GDIDATA->m_usageCount ++;
 
44
};
 
45
 
 
46
void wxGDIObject::DecrementResourceUsage(void)
 
47
{
 
48
    if ( !M_GDIDATA )
 
49
        return;
 
50
 
 
51
  M_GDIDATA->m_usageCount --;
 
52
  if (wxTheApp)
 
53
    wxTheApp->SetPendingCleanup(true);
 
54
//  wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
 
55
  if (M_GDIDATA->m_usageCount < 0)
 
56
  {
 
57
    char buf[80];
 
58
    sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount);
 
59
    wxDebugMsg(buf);
 
60
  }
 
61
//  assert(M_GDIDATA->m_usageCount >= 0);
 
62
};
 
63
 
 
64
*/
 
65