gtk.c File Reference

File that contains the "parent" code. More...

#include "h1.h"

Go to the source code of this file.

Functions

void signal_2 (int)
 Function called when the program receives a SIGUSR2 signal. Does a bunch of stuff. :).
void gtk_clear_exit (int)
 Function called when the program receives a SIGINT signal. Make sure the shared memory "dies" with the program.
void delete_event_main (GtkWidget *widget, gpointer user_data)
 Function to process the force exiting of the main window.
void delete_event_about (GtkWidget *widget, gpointer user_data)
 Function to process the force exiting of the about window. Will hide the window, so it can be displayed again, if needed.
void delete_event_error (GtkWidget *widget, gpointer user_data)
 Function to process the force exiting of the error window. Will hide the window, so it can be displayed again, if needed.
int gtk (void)
 Program responsable for the graphic interface.
void connect_handler (GtkWidget *widget, gpointer user_data)
 Function to process the connect signal. Inform the rs232 program that it needs to connect.
void continuous_handler (GtkWidget *widget, gpointer user_data)
 Function to process the continuous signal. Enables the continuous reading mode.
void single_reading_handler (GtkWidget *widget, gpointer user_data)
 Function to process the single_reading signal. Enables the single reading mode.
void stop_handler (GtkWidget *widget, gpointer user_data)
 Function to process the stop signal. Enables the stop "mode".
void get_reading_handler (GtkWidget *widget, gpointer user_data)
 Function to process the GET_READING signal. Will send a signal to the rs232 program,.
void about_handler (GtkWidget *widget, gpointer user_data)
 Function to process the ABOUT signal. Will show the About Window.
void close_about_handler (GtkWidget *widget, gpointer user_data)
void usb0_handler (GtkWidget *widget, gpointer user_data)
 Function to process usb0 signal. Changes the device used in serial port comunication.
void usb1_handler (GtkWidget *widget, gpointer user_data)
 Function to process usb1 signal. Changes the device used in serial port comunication.
void usb2_handler (GtkWidget *widget, gpointer user_data)
 Function to process usb2 signal. Changes the device used in serial port comunication.
void error_handler (GtkWidget *widget, gpointer user_data)
 Function to process the Error signal from error window. Will hide the error window.
void quit_handler (GtkWidget *widget, gpointer user_data)
 Function to process the QUIT signal from the main window.

Variables

GtkBuilder * builderG
unsigned char * SHM_config
unsigned char * SHM_data
int shm_id1
int shm_id2
char usb_device [64] = "ttyUSB0\0"
char lb_content_n_sensors [16]
char lb_content_n_ultrasounds [16]
char lb_content_n_infrared [16]
char lb_content_index1 [16]
char lb_content_index2 [16]
char lb_content_units [16]


Detailed Description

File that contains the "parent" code.

Programa responsável pela interface gráfica. Recebe e processa os sinais vindos do ficheiro criado em glade, assim como os sinais enviados pelo programa rs232 e a informação partilhada com este através de duas memorias partilhadas.

Author:
Bruno Andrade nº35606

Definition in file gtk.c.


Function Documentation

void about_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the ABOUT signal. Will show the About Window.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 438 of file gtk.c.

void connect_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the connect signal. Inform the rs232 program that it needs to connect.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 304 of file gtk.c.

void continuous_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the continuous signal. Enables the continuous reading mode.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 318 of file gtk.c.

void delete_event_about ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the force exiting of the about window. Will hide the window, so it can be displayed again, if needed.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 276 of file gtk.c.

void delete_event_error ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the force exiting of the error window. Will hide the window, so it can be displayed again, if needed.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 289 of file gtk.c.

void delete_event_main ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the force exiting of the main window.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 264 of file gtk.c.

void error_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the Error signal from error window. Will hide the error window.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 545 of file gtk.c.

void get_reading_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the GET_READING signal. Will send a signal to the rs232 program,.

to inform that it needs to ask for one reading.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 424 of file gtk.c.

int gtk ( void   ) 

Program responsable for the graphic interface.

Program responsable for the serial port comunication.

Parameters:
void 
Returns:
int

Definition at line 35 of file gtk.c.

void gtk_clear_exit ( int  xx  ) 

Function called when the program receives a SIGINT signal. Make sure the shared memory "dies" with the program.

Parameters:
xx 
Returns:
void

Definition at line 242 of file gtk.c.

void quit_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the QUIT signal from the main window.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 558 of file gtk.c.

void signal_2 ( int  x  ) 

Function called when the program receives a SIGUSR2 signal. Does a bunch of stuff. :).

Parameters:
x 
Returns:
void

Definition at line 112 of file gtk.c.

void single_reading_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the single_reading signal. Enables the single reading mode.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 350 of file gtk.c.

void stop_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process the stop signal. Enables the stop "mode".

Parameters:
widget 
user_data 
Returns:
void

Definition at line 392 of file gtk.c.

void usb0_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process usb0 signal. Changes the device used in serial port comunication.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 464 of file gtk.c.

void usb1_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process usb1 signal. Changes the device used in serial port comunication.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 491 of file gtk.c.

void usb2_handler ( GtkWidget *  widget,
gpointer  user_data 
)

Function to process usb2 signal. Changes the device used in serial port comunication.

Parameters:
widget 
user_data 
Returns:
void

Definition at line 518 of file gtk.c.


Generated on Fri Feb 12 22:17:11 2010 for Teste by  doxygen 1.5.8