File: ColorSelect.h

package info (click to toggle)
ltt 0.9.5pre6-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,256 kB
  • ctags: 1,630
  • sloc: ansic: 17,284; sh: 8,010; makefile: 252
file content (110 lines) | stat: -rw-r--r-- 4,408 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
 * ColorSelect.h
 *
 * Copyright (C) 1999 Jean-Hugues Deschenes.
 *
 * This is distributed under GPL.
 *
 * Header for Color selection window.
 *
 * History : 
 *    JH.D., 10/08/1999, Initial typing.
 *
 * Note : The current version of this toolkit is for linux 2.2.0.
 */

#ifndef __TRACE_TOOLKIT_COLOR_SELECT__
#define __TRACE_TOOLKIT_COLOR_SELECT__

#include "EventGraph.h"

#include <gdk/gdkprivate.h>
#include <gtk/gtk.h>

#define gCSLayoutHeight 5 /* Column count for the main packing table */
#define gCSLayoutWidth  3 /* Row count for the main packing table */

/* Define what the OK and Cancel callbacks look like */
typedef void _CSCBCancel
         (gpointer   /* The system view corresponding to this color selection */);
typedef void _CSCBOK
         (GtkWidget* /* The widget that generated the event */,
	  gpointer   /* The system view corresponding to this color selection */);

/* Color Selection window */
typedef struct _colorSelectWindow
{
  /* The data */
  gpointer      SysView;            /* The associated system view */
  GtkWidget*    ParentWin;          /* Parent window */
  _CSCBOK*      CBOK;   
  _CSCBCancel*  CBCancel;

  /* The widgets */
  GtkWidget*    Window;             /* Window to choose files */

  GtkWidget*    VBox;               /* Main Vbox */
  GtkWidget*    LineTypeVBox;       /* VBox to contain Line Type selection items */

  GtkWidget*    ListHBox;           /* HBox for list of configurable items & config controls */
  GtkWidget*    ButtonsHBox;        /* HBox for OK & Cancel buttons */

  GtkWidget*    MainTable;          /* Main packing table */

  GtkWidget*    ItemsList;          /* List of all configurable items */
  GtkWidget*    ScrolledList;       /* The scrollbars for the list */

  GtkWidget*    ColorLabel;         /* Label for the color selection button */
  GtkWidget*    ColorSelectButton;  /* Button to open the Color selection dialog */
  GtkWidget*    ColorDisplay;       /* Area, on the button, to display the current color */

  GtkWidget*    LineTypeFrame;      /* Frame for Line Type definition */
  GSList*       LTRadioBtnGroup;    /* Group for the radio buttons */
  GtkWidget*    LTRadioSolid;       /* Line Type Selection Radio Button - solid */
  GtkWidget*    LTRadioOnOffDash;   /* Line Type Selection Radio Button - on off dash */
  GtkWidget*    LTRadioDoubleDash;  /* Line Type Selection Radio Button - double dash */

  GtkWidget*    OKButton;           /* OK Button */
  GtkWidget*    CancelButton;       /* Cancel Button */

  GtkWidget*    ColorSelectDialog;  /* The GTK+ color selection dialog */

  /* The colors for each configurable item */
  GdkGC*        BackgroundGC;   /* The background color */
  GdkGC*        HorizonGC;      /* Mark the horizontal horizon for every process to ease view */
  GdkGC*        ProcessGC;      /* Time in process */
  GdkGC*        Process0GC;     /* Time in process 0 */
  GdkGC*        KernelGC;       /* Time in kernel  */
  GdkGC*        SelectedGC;     /* Line drawn across the selected event */
  GdkGC*        SysCallGC;      /* Transition due to syscall entry or exit */
  GdkGC*        TrapGC;         /* Transition due to trap entry or exit */
  GdkGC*        InterruptGC;    /* Transition due to interrupt */
  GdkGC*        TextGC;         /* Text color */

  /* The active GC */
  GdkGC*        ActiveGC;       /* This is the GC being configured i.e. selected */

} colorSelectWindow;

/* Function prototypes */
void               CSConnectSignals
                      (colorSelectWindow* /* The open trace window */);
colorSelectWindow* CSCreateColorSelectWindow
		      (gpointer           /* The System view */,
		       GtkWidget*         /* The parent window */,
                       _CSCBOK*           /* Function to call in case of OK */,
		       _CSCBCancel*       /* Function to call in case of cancel or close */);
void CSShowColorSelectWindow
                      (colorSelectWindow* /* The color selection window */,
		       eventGraph*        /* The event graph */);
void CSDestroyColorSelectWindow
                      (colorSelectWindow* /* The color selection window */);
void CSAddListItems
                      (GtkWidget*         /* The list to add to */,
		       char*              /* The text to display */,
		       GdkGC*             /* The GC to place in the callback */);



#endif /* __TRACE_TOOLKIT_COLOR_SELECT__ */