25 #include "pips_config.h"
31 #include <sys/resource.h>
34 #include <sys/resource.h>
35 #include <xview/xview.h>
36 #include <xview/panel.h>
37 #include <xview/text.h>
38 #include <xview/svrimage.h>
44 #if (defined(TEXT_TYPE))
81 char memory_string[17];
83 struct rusage an_rusage;
86 debug(6,
"display_memory_usage",
87 "_text %#x, _data %#x, _end %#x, _brk %#x\n",
90 sprintf(memory_string,
"%10.3f", (sbrk(0) - (
int) &
etext)/(
double)(1 << 20));
93 PANEL_VALUE, memory_string,
96 if (getrusage(RUSAGE_SELF, &an_rusage) == 0) {
98 an_rusage.ru_utime.tv_sec + an_rusage.ru_stime.tv_sec
99 + (an_rusage.ru_utime.tv_usec + an_rusage.ru_stime.tv_usec)*1e-6;
100 sprintf(cpu_string,
"%*.*g",
108 PANEL_VALUE, cpu_string,
137 static char *none =
"(* none *)";
151 static char *none =
"(* none *)";
154 if (module_name_content == NULL)
155 module_name_content = none;
197 xv_set(
message, PANEL_VALUE, message_buffer, 0);
214 PANEL_LABEL_STRING,
"Message:",
215 PANEL_READ_ONLY, TRUE,
216 PANEL_VALUE_DISPLAY_LENGTH, 64,
217 PANEL_VALUE_STORED_LENGTH, 1000,
243 PANEL_VALUE_STORED_LENGTH, 512,
269 PANEL_LABEL_STRING,
"Memory (MB):",
270 PANEL_VALUE_DISPLAY_LENGTH, 9,
271 PANEL_READ_ONLY, TRUE,
275 PANEL_LABEL_STRING,
"CPU (s):",
277 PANEL_READ_ONLY, TRUE,
288 PANEL_LABEL_STRING,
"# windows:",
292 PANEL_VALUE_DISPLAY_LENGTH, 2,
string db_get_current_module_name(void)
Also used to check whether set...
void const char const char const int
bool wpips_emacs_mode
Here are all the stuff to interface Pips with Emacs.
void send_window_number_to_emacs(int number)
char * get_cwd(void)
returns the current working directory name.
GtkWidget * main_frame
If we are in the Emacs mode, the log_frame is no longer really used:
static Server_image pips_icon_server_image[LAST_ICON]
Server_image wpips_positive_server_image
To store the negative image for a blinking icon in the interrupt button:
Server_image create_status_window_pips_image()
Server_image wpips_negative_server_image
GtkWidget * generate_module_menu()
participe à la génération du menu associés aux modules dans la fenetre principale
GtkWidget * generate_workspace_menu()
To use with schoose_create_abbrev_menu_with_text:
success end_directory_notify(const char *dir)
GtkWidget * generate_directory_menu()
void open_or_create_workspace(const char *workspace_name_original)
To be used with schoose_create_abbrev_menu_with_text from the main panel:
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
string db_get_current_workspace_name(void)
the function is used to check that there is some current workspace...
#define MAX_NUMBER_OF_WPIPS_WINDOWS
How many display wondows can be opened :
int number_of_wpips_windows
void wpips_interrupt_pipsmake(Panel_item item, Event *event)
To ask pipsmake to stop as soon as possible:
Panel_item schoose_create_abbrev_menu_with_text(Panel main_panel, char *label_string, int value_display_length, int x, int y, Menu(*generate_menu)(void), void(*after_selection)(char *))
Create an abbreviation menu attached with a text item.
void end_select_module_notify(string name)
void wpips_interrupt_button_restore()
Panel_item module_name_panel_item
void wpips_interrupt_button_blink()
Panel_item workspace_name_panel_item
void display_memory_usage()
Panel_item cpu_usage_item
Server_image status_window_pips_image
void show_message(string message_buffer)
Panel_item directory_name_panel_item
void create_status_subwindow()
etext
Strange, "man end" says that end is a function!
void window_number_notify(Panel_item item, int value, Event *event)