| 1 | /* This file is part of the Linux Trace Toolkit viewer |
| 2 | * Copyright (C) 2009 Benjamin Poirier <benjamin.poirier@polymtl.ca> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License Version 2 as |
| 6 | * published by the Free Software Foundation; |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program; if not, write to the Free Software |
| 15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
| 16 | * MA 02111-1307, USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef GRAPH_FUNCTIONS_H |
| 20 | #define GRAPH_FUNCTIONS_H |
| 21 | |
| 22 | struct _SyncState; |
| 23 | |
| 24 | typedef void (GraphVariableFunction)(struct _SyncState* const syncState, const |
| 25 | unsigned int i); |
| 26 | typedef void (GraphFunction)(struct _SyncState* const syncState, const |
| 27 | unsigned int i, const unsigned int j); |
| 28 | |
| 29 | typedef struct |
| 30 | { |
| 31 | GraphVariableFunction* writeVariables; |
| 32 | /* This is for graphs where the data on both axis is in the range of |
| 33 | * timestamps */ |
| 34 | GraphFunction* writeTraceTraceForePlots; |
| 35 | GraphFunction* writeTraceTraceBackPlots; |
| 36 | GraphFunction* writeTraceTraceOptions; |
| 37 | /* This is for graphs where the data on the abscissa is in the range of |
| 38 | * timestamps and the ordinates is in the range of timestamp deltas */ |
| 39 | GraphFunction* writeTraceTimeForePlots; |
| 40 | GraphFunction* writeTraceTimeBackPlots; |
| 41 | GraphFunction* writeTraceTimeOptions; |
| 42 | } GraphFunctions; |
| 43 | |
| 44 | |
| 45 | FILE* createGraphsDir(const char* const graphsDir); |
| 46 | char* changeToGraphsDir(const char* const graphsDir); |
| 47 | void writeGraphsScript(struct _SyncState* const syncState); |
| 48 | |
| 49 | #endif |