+/* This file is part of the Linux Trace Toolkit viewer
+ * Copyright (C) 2003-2004 Mathieu Desnoyers
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+
#ifndef _DRAW_ITEM_H
#define _DRAW_ITEM_H
ITEM_TEXT, ITEM_ICON, ITEM_LINE, ITEM_POINT, ITEM_BACKGROUND
};
+typedef enum _RelPosX {
+ POS_START, POS_END
+} RelPosX;
-typedef enum _RelPos {
+typedef enum _RelPosY {
OVER, MIDDLE, UNDER
-} RelPos;
+} RelPosY;
/* The DrawContext keeps information about the current drawing position and
* when we draw a text, an arc or an icon, while it's unneeded when we
* draw a line or background.
*
+ * The modify_* positions are altered by the draw item functions.
+ *
*/
GdkGC *gc;
PangoLayout *pango_layout;
- DrawInfo *current;
- DrawInfo *previous;
+ struct {
+ struct {
+ gint x;
+ struct {
+ gint over;
+ gint middle;
+ gint under;
+ } offset;
+ } start;
+
+ struct {
+ gint x;
+ struct {
+ gint over;
+ gint middle;
+ gint under;
+ } offset;
+ } end;
+
+ struct {
+ gint over;
+ gint middle;
+ gint under;
+ } y;
+
+ } drawinfo;
};
-/* LttvExecutionState is accessible through the LttvTracefileState. Is has
- * a pointer to the LttvProcessState which points to the top of stack
- * execution state : LttvExecutionState *state.
- *
- * LttvExecutionState contains (useful here):
- * LttvExecutionMode t,
- * LttvExecutionSubmode n,
- * LttvProcessStatus s
- *
- *
- * LttvTraceState will be used in the case we need the string of the
- * different processes, eventtype_names, syscall_names, trap_names, irq_names.
- *
- * LttvTracefileState also gives the cpu_name and, as it herits from
- * LttvTracefileContext, it gives the LttEvent structure, which is needed
- * to get facility name and event name.
- */
-struct _DrawInfo {
- ItemInfo *over;
- ItemInfo *middle;
- ItemInfo *under;
-
- ItemInfo *modify_over;
- ItemInfo *modify_middle;
- ItemInfo *modify_under;
- LttvProcessStatus status;
-};
-struct _ItemInfo {
- gint x, y;
-};
+
/*
* Structure used to keep information about icons.
struct _PropertiesText {
GdkColor *foreground;
GdkColor *background;
- gint size;
- gchar *text;
- RelPos position;
+ gint size;
+ gchar *text;
+ struct {
+ RelPosX x;
+ RelPosY y;
+ } position;
};
gchar *icon_name;
gint width;
gint height;
- RelPos position;
+ struct {
+ RelPosX x;
+ RelPosY y;
+ } position;
};
struct _PropertiesLine {
- GdkColor *color;
+ GdkColor color;
gint line_width;
GdkLineStyle style;
- RelPos position;
+ RelPosY y;
};
struct _PropertiesArc {
GdkColor *color;
gint size; /* We force circle by width = height */
gboolean filled;
- RelPos position;
+ struct {
+ RelPosX x;
+ RelPosY y;
+ } position;
};
struct _PropertiesBG {
* process_states/ "name associated with LTTV_STATE_SYSCALL"
*/
+
+#if 0
/*
* The add_operation has to do a quick sort by priority to keep the operations
* in the right order.
*/
void exec_operations( LttvIAttribute *attributes,
gchar *pathname);
-
-
-/*
- * Functions to create Properties structures.
- */
-
-PropertiesText *properties_text_create(
- GdkColor *foreground,
- GdkColor *background,
- gint size,
- gchar *text,
- RelPos position);
-
-PropertiesIcon *properties_icon_create(
- gchar *icon_name,
- gint width,
- gint height,
- RelPos position);
-
-PropertiesLine *properties_line_create(
- GdkColor *color,
- gint line_width,
- GdkLineStyle style,
- RelPos position);
-
-PropertiesArc *properties_arc_create(
- GdkColor *color,
- gint size,
- gboolean filled,
- RelPos position);
-
-PropertiesBG *properties_bg_create(
- GdkColor *color);
-
-
-
+#endif //0
/*
* Here follow the prototypes of the hook functions used to draw the