src/interface/vapiGtkInterface.h

Ir para a documentação deste ficheiro.
00001 #ifndef _VAPI_GTK_INTERFACE_H_
00002 
00003 #define _VAPI_GTK_INTERFACE_H_
00004 
00005 #include <gtk/gtk.h>
00006 #include <glade/glade.h>
00007 #include <cv.h>
00008 #include <cvaux.h>
00009 #include <highgui.h>
00010 #include "vapi.h"
00011 #include "vapiMacro.h"
00012 #include "vapiCameraSettings.h"
00013 #include "vapiMacroList.h"
00014 #include "vapiOperationList.h"
00015 
00016 /*
00017  * Por questão de facilidade é definida a variavel global 
00018  *  para mensagens do Programa.
00019  */
00020 GtkWidget *LoadScreen;
00021 GtkWidget *LoadScreenProgress;
00022 GtkWidget *LoadScreenMessage;
00023 
00024 typedef struct _vTempFloat
00025 {
00026         double value;
00027         int intValue;
00028 
00029 } vTempFloat;
00030 
00031 typedef struct _vapiWidgetStruct
00032 {
00033         GtkWidget *imActual;
00034         GtkWidget *imWork;
00035         GtkWidget *imOriginal;
00036         GtkWidget *txtOperation;
00037         GtkWidget *txtMacroName;
00038         GtkWidget *cbCam;
00039         GtkWidget *txtOptItemName;
00040         GtkWidget *txtOptItemNum;
00041         GtkTreeStore *treeMacroStore;
00042         GtkWidget *OptionsParent;
00043         GtkWidget *OptionsFrame;
00044         GtkWidget *OptionsScroll;
00045         GtkWidget *cbImageFile;
00046         GList *OptionsList;
00047         GList *OptionsData;
00048         GList *OptionsEvents;
00049         GtkWidget *rbMenuCasosCamara;
00050         GtkWidget *rbMenuCasosFusiveis;
00051         GtkWidget *rbMenuCasosComprimidos;
00052         GtkWidget *rbMenuCasosOCR;
00053         GtkWidget *ImageWindowTemplate;
00054         GtkWidget *imSelectTemplate;
00055         GtkWidget *ImageWindow;
00056         GtkWidget *imShowOriginalSize;
00057         GtkWidget *ImageWindowSelectRegion;
00058         GtkWidget *imSelectRegion;
00059         GtkWidget *winCreateMacro;
00060 
00061 
00062 } vapiWidgetStruct;
00063 
00064 typedef struct _vapiGtkGetCoordinates
00065 {
00066         int npoints;
00067         vPoint Vertice[4];
00068         vImages *Images;
00069         GtkWidget *imSelectTemplate;
00070         GtkWidget *txtTemplateFilename;
00071         GtkWidget *stTemplateWindow;
00072         GtkWidget *stSelectRegion;
00073         GtkWidget *imSelectRegion;
00074 
00075 } vapiGtkGetCoordinates;
00076 
00077 typedef struct _vapiTemp1Struct
00078 {
00079         vapiWidgetStruct *Widgets;
00080         vImages *Images;
00081         vMacroList *MacroList;
00082         vOperationList *OperationList;
00083         IplImage *imWork;
00084         vapiGtkGetCoordinates *GetCoordinates;
00085         vCameraSettings *CameraSettings;
00086 } vapiTemp1Struct;
00087 
00088 typedef struct _vapiCalibrateCamera
00089 {
00090         GtkWidget *ImCalibrateOriginal;
00091         vImages *Images;
00092 } vapiCalibrateCamera;
00093 
00094 typedef struct _vapiEventList
00095 {
00096         GtkWidget *widget;
00097         gulong eventHandler;
00098 
00099 } vapiEventList;
00100 
00101 typedef struct _vapiCalibrateCameraExpandersA
00102 {
00103         GtkWidget *exCalibrateAColour;
00104         GtkWidget *exCalibrateAFilters;
00105         GtkWidget *exCalibrateADistance;
00106 } vapiCalibrateCameraExpandersA;
00107 
00108 typedef struct _vapiCalibrateCameraExpandersB
00109 {
00110         GtkWidget *exCalibrateBColour;
00111         GtkWidget *exCalibrateBFilters;
00112         GtkWidget *exCalibrateBDistance;
00113 } vapiCalibrateCameraExpandersB;
00114 
00115 typedef struct _vapiCalibrateCameraCalculate
00116 {
00117         GladeXML *xml;
00118         vOperationList *OperationList;
00119         vImages *Images;
00120         vCameraSettings *CameraSettings;
00121 
00122 } vapiCalibrateCameraCalculate;
00123 /*
00124  * Transforma as estruturas IplImage de modo a serem mostradas nos GtkWidget.
00125  */
00126 GdkPixbuf *vapiGtkPixbuf (GtkWidget * widget, IplImage * img, int rescale);
00127 
00128  /*
00129   * Carrega uma imagem para o GtkImage.
00130   */
00131 void vapiGtkPutImage (GtkWidget * Widget, IplImage * Image);
00132 
00133  /*
00134   * Carrega o interface glade.
00135   */
00136 GladeXML *vapiGtkLoadInterface ();
00137 
00138 /*
00139  * a função vapiGtkConnectEvents espera e lança todos os eventos relacionados
00140  * com o interface.
00141  */
00142 void
00143 vapiGtkConnectEvents (vapiWidgetStruct * Widgets, vImages * Images,
00144                       vCameraSettings * CameraSettings,
00145                       vOperationList * OperationList, vMacroList * MacroList,
00146                       GladeXML * xml);
00147 
00148 void vapiGtkSaveImage (GtkWidget * widget, vImages * Images);
00149 
00150 void vapiGtkGetOriginal (GtkWidget * widget, vapiTemp1Struct * temp);
00151 
00152 /*
00153  * Lança o interface
00154  */
00155 int interface_os_linux (vOperationList * OperationList,
00156                         vGroupList * GroupList,
00157                         vCameraSettings * CameraSettings,
00158                         vMacroList * MacroList, vImages * Images,
00159                         GladeXML * xml);
00160 
00161 void vapiGtkCbLoadStaticImage (GtkWidget * widget, vapiTemp1Struct * temp);
00162 
00163 void vapiGtkGetOriginal (GtkWidget * widget, vapiTemp1Struct * temp);
00164 
00165 void vapiGtkToolbarStyle (GtkWidget * widget, GtkWidget * toolbar);
00166 
00167 void vapiCompareInt (vImages * Images, vOptions * options,
00168                      vMacroResult * PreviousResult);
00169 
00170 void vapiGtkSaveWorkImage (GtkWidget * widget, vapiTemp1Struct * temp);
00171 
00172 void vapiGtkPutImageNotScaled (GtkWidget * Widget, IplImage * Image);
00173 
00174 void
00175 vapiGtkSelectROIActual (GtkWidget * widget,
00176                         GdkEventFocus * event, vapiTemp1Struct * temp);
00177 
00178 void
00179 vapiGtkGrabMouseLocation (GtkWidget * widget,
00180                           GdkDragContext * drag_context,
00181                           vapiGtkGetCoordinates * GetCoordinates);
00182 void vapiGtkSaveTemplate (GtkWidget * widget, vapiTemp1Struct * temp);
00183 
00184 gboolean vapiGtkTemplateDrag (GtkWidget * widget,
00185                               GdkEventMotion * event,
00186                               vapiGtkGetCoordinates * GetCoordinates);
00187 
00188 gboolean vapiGtkShowImageWindow (GtkWidget * widget,
00189                                  GdkEventCrossing * event,
00190                                  vapiTemp1Struct * temp);
00191 
00192 gboolean vapiGtkShowImageWindowLeave (GtkWidget * widget,
00193                                       GdkEventCrossing * event,
00194                                       vapiTemp1Struct * temp);
00195 
00196 void vapiGtkSelectRegion (GtkWidget * widget,
00197                           GdkEventButton * event,
00198                           vapiGtkGetCoordinates * GetCoordinates);
00199 
00200 void vapiGtkSaveSelectedRegion (GtkWidget * widget, vapiTemp1Struct * temp);
00201 
00202 void vapiGtkExpandersB (GtkWidget * widget,
00203                         vapiCalibrateCameraExpandersB * expandersB);
00204 
00205 void vapiGtkExpandersA (GtkWidget * widget,
00206                         vapiCalibrateCameraExpandersA * expandersA);
00207 void vapiGtkEventCalibrateCamera (GtkWidget * widget,
00208                                   vapiCalibrateCameraCalculate *
00209                                   CalibrateCameraCalculate);
00210 
00211 void vapiGtkEventCalibrateCameraTestColourDefinitions (GtkWidget * widget,
00212                                                        vapiCalibrateCameraCalculate
00213                                                        *
00214                                                        CalibrateCameraCalculate);
00215 GtkWidget *vapiGtkAboutDialog ();
00216 
00217 void showWidget(GtkWidget * widget1, GtkWidget * widget2);
00218 
00219 #endif

Gerado em Tue Jul 24 10:34:58 2007 para Vapi por  doxygen 1.5.1