Bug 439354 - OS X toolbar background doesn't have a good gradient, part 1 / 3, r...
[mozilla-central.git] / xpcom / base / pure.h
blob1338d9bc34462f583c34fbd4801ae5f71fd12151
1 /*
2 * Header file of Pure API function declarations.
4 * Explicitly no copyright.
5 * You may recompile and redistribute these definitions as required.
7 * Version 1.0
8 */
10 #if defined(c_plusplus) || defined(__cplusplus)
11 extern "C" {
12 #endif
14 #define PURE_H_VERSION 1
16 //////////////////////////////
17 // API's Specific to Purify //
18 //////////////////////////////
20 // TRUE when Purify is running.
21 int __cdecl PurifyIsRunning(void) ;
23 // Print a string to the viewer.
25 int __cdecl PurePrintf(const char *fmt, ...) ;
26 int __cdecl PurifyPrintf(const char *fmt, ...) ;
28 // Purify functions for leak and memory-in-use functionalty.
30 int __cdecl PurifyNewInuse(void) ;
31 int __cdecl PurifyAllInuse(void) ;
32 int __cdecl PurifyClearInuse(void) ;
33 int __cdecl PurifyNewLeaks(void) ;
34 int __cdecl PurifyAllLeaks(void) ;
35 int __cdecl PurifyClearLeaks(void) ;
37 // Purify functions for handle leakage.
39 int __cdecl PurifyAllHandlesInuse(void) ;
40 int __cdecl PurifyNewHandlesInuse(void) ;
42 // Functions that tell you about the state of memory.
44 int __cdecl PurifyDescribe(void *addr) ;
45 int __cdecl PurifyWhatColors(void *addr, int size) ;
47 // Functions to test the state of memory. If the memory is not
48 // accessible, an error is signaled just as if there were a memory
49 // reference and the function returns false.
51 int __cdecl PurifyAssertIsReadable(const void *addr, int size) ;
52 int __cdecl PurifyAssertIsWritable(const void *addr, int size) ;
54 // Functions to test the state of memory. If the memory is not
55 // accessible, these functions return false. No error is signaled.
57 int __cdecl PurifyIsReadable(const void *addr, int size) ;
58 int __cdecl PurifyIsWritable(const void *addr, int size) ;
59 int __cdecl PurifyIsInitialized(const void *addr, int size) ;
61 // Functions to set the state of memory.
63 void __cdecl PurifyMarkAsInitialized(void *addr, int size) ;
64 void __cdecl PurifyMarkAsUninitialized(void *addr, int size) ;
66 // Functions to do late detection of ABWs, FMWs, IPWs.
68 #define PURIFY_HEAP_CRT 0xfffffffe
69 #define PURIFY_HEAP_ALL 0xfffffffd
70 #define PURIFY_HEAP_BLOCKS_LIVE 0x80000000
71 #define PURIFY_HEAP_BLOCKS_DEFERRED_FREE 0x40000000
72 #define PURIFY_HEAP_BLOCKS_ALL (PURIFY_HEAP_BLOCKS_LIVE|PURIFY_HEAP_BLOCKS_DEFERRED_FREE)
73 int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr) ;
74 int __cdecl PurifySetLateDetectScanCounter(int counter);
75 int __cdecl PurifySetLateDetectScanInterval(int seconds);
78 ////////////////////////////////
79 // API's Specific to Quantify //
80 ////////////////////////////////
82 // TRUE when Quantify is running.
83 int __cdecl QuantifyIsRunning(void) ;
86 // Functions for controlling collection
88 int __cdecl QuantifyDisableRecordingData(void) ;
89 int __cdecl QuantifyStartRecordingData(void) ;
90 int __cdecl QuantifyStopRecordingData(void) ;
91 int __cdecl QuantifyClearData(void) ;
92 int __cdecl QuantifyIsRecordingData(void) ;
94 // Add a comment to the dataset
95 int __cdecl QuantifyAddAnnotation(char *) ;
97 // Save the current data, creating a "checkpoint" dataset
98 int __cdecl QuantifySaveData(void) ;
100 ////////////////////////////////
101 // API's Specific to Coverage //
102 ////////////////////////////////
104 // TRUE when Coverage is running.
105 int __cdecl CoverageIsRunning(void) ;
107 // Functions for controlling collection
109 int __cdecl CoverageDisableRecordingData(void) ;
110 int __cdecl CoverageStartRecordingData(void) ;
111 int __cdecl CoverageStopRecordingData(void) ;
112 int __cdecl CoverageClearData(void) ;
113 int __cdecl CoverageIsRecordingData(void) ;
114 // Add a comment to the dataset
115 int __cdecl CoverageAddAnnotation(char *) ;
117 // Save the current data, creating a "checkpoint" dataset
118 int __cdecl CoverageSaveData(void) ;
123 ////////////////////////////////
124 // API's Specific to Purelock //
125 ////////////////////////////////
127 // TRUE when Purelock is running.
128 int __cdecl PurelockIsRunning(void) ;
133 #if defined(c_plusplus) || defined(__cplusplus)
135 #endif