Implemented basic scaling in BasicViewport.
[aesalon.git] / include / informer / Informer.h
blobee1766ef04156ba2b6f3cea88e621ed29caa46e2
1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file informer/Informer.h
8 */
10 #ifndef AesalonInformer_Informer_H
11 #define AesalonInformer_Informer_H
13 #include <stdint.h>
14 #include <pthread.h>
16 #include "ModuleID.h"
17 #include "shm/Header.h"
18 #include "shm/ZoneHeader.h"
20 #ifdef __GNUC__
21 #pragma GCC visibility push(hidden)
22 #define AC_EXPORT __attribute__((visibility("default")))
23 #define AC_PRIVATE __attribute__((visibility("hidden")))
25 #define THREAD_SPECIFIC __thread
26 #else
27 #error "No supported compiler detected."
28 #endif
30 /* Constructor/destructors. */
31 /** Constructor for the Informer module. Should be called from every module constructor. */
32 void __attribute__((constructor)) AC_EXPORT AI_Construct();
33 /** Destructor for the Informer module. Should be called from every module destructor. */
34 void __attribute__((destructor)) AC_EXPORT AI_Destruct();
36 /* Packet functions. */
37 void AC_EXPORT AI_StartPacket(ModuleID moduleID);
38 void AC_EXPORT *AI_PacketSpace(uint32_t size);
39 void AC_EXPORT AI_EndPacket();
41 /* Utility functions. */
42 /** Calculates a unique timestamp for the current instant. */
43 uint64_t AC_EXPORT AI_Timestamp();
44 void AC_EXPORT AI_ModuleLoaded(const char *name, ModuleID moduleID);
46 /* Configuration functions. */
47 /** Returns a configuration item, @a name, as a string. */
48 const char AC_EXPORT *AI_ConfigurationString(const char *name);
49 /** Returns a configuration item, @a name, as a long. */
50 long AC_EXPORT AI_ConfigurationLong(const char *name);
51 /** Returns a configuration item, @a name, as a boolean integer. */
52 int AC_EXPORT AI_ConfigurationBool(const char *name);
54 /* Collection management functions. */
55 /** Temporarily pauses collection for the given thread ID. */
56 void AC_EXPORT AI_StopCollection(pthread_t threadID);
57 /** Continues collection for the given thread. */
58 void AC_EXPORT AI_ContinueCollection(pthread_t threadID);
59 /** Returns 1 if data should be collected, 0 otherwise. */
60 short AC_EXPORT AI_CollectionStatus();
63 #endif