Referência ao ficheiro src/interface/vapiGtkSetOriginWindow.h

#include "vapiGtkInterface.h"
#include "vapiCameraAcquisition.h"

Diagrama de dependências de inclusão para vapiGtkSetOriginWindow.h:

Este grafo mostra quais são os ficheiros que incluem directamente ou indirectamente este ficheiro:

Ir para o código fonte deste ficheiro.

Estruturas de Dados

struct  _vapiGtkSetOriginWindow

Definições de tipos

typedef _vapiGtkSetOriginWindow vapiGtkSetOriginWindow

Funções

void vapiGtkSetOriginWindowDefineSource (GtkFileChooser *chooser, gint response, vapiGtkSetOriginWindow *SetOrigin)
void vapiGtkSetOriginWindowInit (GladeXML *xml, vCameraSettings *CameraSettings, vImages *Images)
void vapiGtkSetOriginWindowLaunchImageLoad (GtkWidget *widget, vapiGtkSetOriginWindow *SetOrigin)
void vapiGtkSetOriginWindowNewVapi (GtkWidget *widget, vapiGtkSetOriginWindow *SetOrigin)
void vapiGtkSetOriginWindowSaveOrigin (GtkWidget *widget, vapiGtkSetOriginWindow *SetOrigin)
void vapiGtkSetOriginWindowTestOrigin (GtkWidget *widget, vapiGtkSetOriginWindow *SetOrigin)
void vapiGtkSetOriginWindowTestSaveOrigin (vapiGtkSetOriginWindow *SetOrigin, vBoolean SaveSettings)
void vapiGtkSetOriginWindowUpdatePreview (GtkFileChooser *chooser, GtkWidget *ImPreview)


Documentação dos tipos

typedef struct _vapiGtkSetOriginWindow vapiGtkSetOriginWindow


Documentação das funções

void vapiGtkSetOriginWindowDefineSource ( GtkFileChooser *  chooser,
gint  response,
vapiGtkSetOriginWindow SetOrigin 
)

Definido na linha 193 do ficheiro vapiGtkSetOriginWindow.c.

Referências btTestOrigin, _vapiGtkSetOriginWindow::CamLocalFilePATH e v_debug.

Referenciado por vapiGtkSetOriginWindowLaunchImageLoad().

00195 {
00196         char *filename;
00197         if (response == GTK_RESPONSE_CANCEL)
00198         {
00199                 gtk_widget_destroy ((GtkWidget *) chooser);
00200                 return;
00201         }
00202         if (response != GTK_RESPONSE_OK)
00203         {
00204                 return;
00205         }
00206         filename = gtk_file_chooser_get_filename (chooser);
00207         v_debug ("here");
00208         gtk_entry_set_text ((GtkEntry *) SetOrigin->CamLocalFilePATH,
00209                             filename);
00210         v_debug ("here2");
00211         gtk_widget_destroy ((GtkWidget *) chooser);
00212         g_free (filename);
00213         g_signal_emit_by_name (btTestOrigin, "clicked");
00214 }

Here is the caller graph for this function:

void vapiGtkSetOriginWindowInit ( GladeXML *  xml,
vCameraSettings CameraSettings,
vImages Images 
)

Definido na linha 13 do ficheiro vapiGtkSetOriginWindow.c.

Referências btTestOrigin, _vapiGtkSetOriginWindow::CameraSettings, _vapiGtkSetOriginWindow::CamIndex, _vapiGtkSetOriginWindow::CamIP, _vapiGtkSetOriginWindow::CamLocalFilePATH, _vapiGtkSetOriginWindow::CamURL, _vapiGtkSetOriginWindow::Images, _vapiGtkSetOriginWindow::imOriginTest, LoadScreen, _vapiGtkSetOriginWindow::nbCameraType, _vapiGtkSetOriginWindow::RefreshButton, vapiCameraSettingsGetType(), vapiGtkSetOriginWindowLaunchImageLoad(), vapiGtkSetOriginWindowNewVapi(), vapiGtkSetOriginWindowSaveOrigin(), vapiGtkSetOriginWindowTestOrigin() e vCameraNONE.

Referenciado por interface_os_linux().

00015 {
00016         vapiGtkSetOriginWindow *SetOrigin =
00017                 malloc (sizeof (vapiGtkSetOriginWindow));
00018         GtkWidget *btSaveOrigin;
00019         GtkWidget *btNewVapi;
00020         GtkWidget *winSetImageOrigin;
00021         GtkWidget *btSelectImage;
00022 
00023         SetOrigin->Images = Images;
00024         SetOrigin->CameraSettings = CameraSettings;
00025         SetOrigin->nbCameraType = glade_xml_get_widget (xml, "nbCamType");
00026         SetOrigin->CamLocalFilePATH =
00027                 glade_xml_get_widget (xml, "CamLocalFilePATH");
00028         btTestOrigin = glade_xml_get_widget (xml, "btTestOrigin");
00029         btSaveOrigin = glade_xml_get_widget (xml, "btSaveOrigin");
00030         SetOrigin->imOriginTest = glade_xml_get_widget (xml, "imOriginTest");
00031         SetOrigin->CamIndex = glade_xml_get_widget (xml, "CamIndex");
00032         SetOrigin->CamIP = glade_xml_get_widget (xml, "CamIP");
00033         SetOrigin->CamURL = glade_xml_get_widget (xml, "CamURL");
00034         btNewVapi = glade_xml_get_widget (xml, "btNewVapi");
00035         winSetImageOrigin = glade_xml_get_widget (xml, "winSetImageOrigin");
00036         SetOrigin->RefreshButton = glade_xml_get_widget (xml, "btRefresh");
00037         btSelectImage = glade_xml_get_widget (xml, "btSelectImage");
00038         /*
00039          * Eventos associados aos botões.
00040          */
00041         g_signal_connect_after (G_OBJECT (btTestOrigin), "clicked",
00042                                 G_CALLBACK (vapiGtkSetOriginWindowTestOrigin),
00043                                 SetOrigin);
00044 
00045         g_signal_connect_after (G_OBJECT (btSaveOrigin), "clicked",
00046                                 G_CALLBACK (vapiGtkSetOriginWindowSaveOrigin),
00047                                 SetOrigin);
00048         g_signal_connect_after (G_OBJECT (btNewVapi), "clicked",
00049                                 G_CALLBACK (vapiGtkSetOriginWindowNewVapi),
00050                                 SetOrigin);
00051         g_signal_connect_after (G_OBJECT (btSelectImage), "clicked",
00052                                 G_CALLBACK
00053                                 (vapiGtkSetOriginWindowLaunchImageLoad),
00054                                 SetOrigin);
00055 
00056         if (vapiCameraSettingsGetType (SetOrigin->CameraSettings) ==
00057             vCameraNONE)
00058         {
00059                 gtk_widget_show_all (winSetImageOrigin);
00060                 gtk_widget_grab_focus (LoadScreen);
00061         }
00062 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSetOriginWindowLaunchImageLoad ( GtkWidget *  widget,
vapiGtkSetOriginWindow SetOrigin 
)

Definido na linha 241 do ficheiro vapiGtkSetOriginWindow.c.

Referências vapiGtkImagesFilter(), vapiGtkSetOriginWindowDefineSource() e vapiGtkSetOriginWindowUpdatePreview().

Referenciado por vapiGtkSetOriginWindowInit().

00243 {
00244         GtkWidget *chooser;
00245         GtkWidget *ImPreview;
00246 
00247         ImPreview = gtk_image_new ();
00248         gtk_widget_set_size_request (ImPreview, 260, 200);
00249 
00250         chooser =
00251                 gtk_file_chooser_dialog_new ("Carregar Macro de ficheiro",
00252                                              NULL,
00253                                              GTK_FILE_CHOOSER_ACTION_OPEN,
00254                                              NULL, NULL);
00255         /*
00256          * Adicionar botões de ok e cancel.
00257          */
00258         gtk_dialog_add_buttons ((GtkDialog *) chooser,
00259                                 "gtk-cancel", GTK_RESPONSE_CANCEL, "gtk-open",
00260                                 GTK_RESPONSE_OK, NULL);
00261         gtk_file_chooser_set_preview_widget_active ((GtkFileChooser *)
00262                                                     chooser, TRUE);
00263         gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser),
00264                                      vapiGtkImagesFilter ());
00265         gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (chooser),
00266                                              ImPreview);
00267 
00268         g_signal_connect (G_OBJECT (chooser), "update-preview",
00269                           G_CALLBACK (vapiGtkSetOriginWindowUpdatePreview),
00270                           ImPreview);
00271 
00272         g_signal_connect (G_OBJECT (chooser), "response",
00273                           G_CALLBACK (vapiGtkSetOriginWindowDefineSource),
00274                           SetOrigin);
00275 
00276         gtk_widget_show_all (chooser);
00277 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSetOriginWindowNewVapi ( GtkWidget *  widget,
vapiGtkSetOriginWindow SetOrigin 
)

Definido na linha 163 do ficheiro vapiGtkSetOriginWindow.c.

Referências _vapiGtkSetOriginWindow::CameraSettings, _vapiGtkSetOriginWindow::CamIndex, _vapiGtkSetOriginWindow::CamIP, _vapiGtkSetOriginWindow::CamLocalFilePATH, _vapiGtkSetOriginWindow::CamURL, _vapiGtkSetOriginWindow::Images, _vapiGtkSetOriginWindow::nbCameraType, v_error(), v_info(), vapiCameraSettingsInit(), vapiCameraSettingsStartNewVapi(), vapiGtkSetOriginWindowTestSaveOrigin(), vCameraSettingsFree(), vImagesFree(), vImagesInit() e vTRUE.

Referenciado por vapiGtkSetOriginWindowInit().

00165 {
00166 
00167         vapiGtkSetOriginWindow *SetOrigin2;
00168         vImages *tempImages = vImagesInit ();
00169         vCameraSettings *tempCameraSettings;
00170         tempCameraSettings = vapiCameraSettingsInit ();
00171 
00172         SetOrigin2 = malloc (sizeof (vapiGtkSetOriginWindow));
00173 
00174         SetOrigin2->Images = tempImages;
00175         SetOrigin2->nbCameraType = SetOrigin->nbCameraType;
00176         SetOrigin2->CameraSettings = tempCameraSettings;
00177         SetOrigin2->CamLocalFilePATH = SetOrigin->CamLocalFilePATH;
00178         SetOrigin2->CamIP = SetOrigin->CamIP;
00179         SetOrigin2->CamIndex = SetOrigin->CamIndex;
00180         SetOrigin2->CamURL = SetOrigin->CamURL;
00181         v_info ("a iniciar um vapi novo");
00182         vapiGtkSetOriginWindowTestSaveOrigin (SetOrigin2, vTRUE);
00183         if (vapiCameraSettingsStartNewVapi (SetOrigin2->CameraSettings))
00184         {
00185                 v_error ("erro ao iniciar um novo vapi");
00186         }
00187         vImagesFree (tempImages);
00188         vCameraSettingsFree (tempCameraSettings);
00189         free (SetOrigin2);
00190 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSetOriginWindowSaveOrigin ( GtkWidget *  widget,
vapiGtkSetOriginWindow SetOrigin 
)

Definido na linha 73 do ficheiro vapiGtkSetOriginWindow.c.

Referências _vapiGtkSetOriginWindow::Images, _vapiGtkSetOriginWindow::RefreshButton, vapiGtkSetOriginWindowTestSaveOrigin(), vImagesFreeImages() e vTRUE.

Referenciado por vapiGtkSetOriginWindowInit().

00075 {
00076         vImagesFreeImages (SetOrigin->Images);
00077         vapiGtkSetOriginWindowTestSaveOrigin (SetOrigin, vTRUE);
00078         /*
00079          * ctualizar a imagem na janela Principal.
00080          */
00081         g_signal_emit_by_name (SetOrigin->RefreshButton, "clicked", NULL);
00082 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSetOriginWindowTestOrigin ( GtkWidget *  widget,
vapiGtkSetOriginWindow SetOrigin 
)

Definido na linha 65 do ficheiro vapiGtkSetOriginWindow.c.

Referências vapiGtkSetOriginWindowTestSaveOrigin() e vFALSE.

Referenciado por vapiGtkSetOriginWindowInit().

00067 {
00068         vapiGtkSetOriginWindowTestSaveOrigin (SetOrigin, vFALSE);
00069 
00070 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSetOriginWindowTestSaveOrigin ( vapiGtkSetOriginWindow SetOrigin,
vBoolean  SaveSettings 
)

Definido na linha 85 do ficheiro vapiGtkSetOriginWindow.c.

Referências _vapiGtkSetOriginWindow::CameraSettings, _vapiGtkSetOriginWindow::CamIP, _vapiGtkSetOriginWindow::CamLocalFilePATH, _vapiGtkSetOriginWindow::CamURL, HaveAcquisitionLoadingProgress, _vapiGtkSetOriginWindow::Images, _vapiGtkSetOriginWindow::imOriginTest, _vImages::Original, vapiCameraSettingsInit(), vapiCameraSettingsSetTypeLocal(), vapiCameraSettingsSetTypeLocalFile(), vapiCameraSettingsSetTypeRemoteIP(), vapiGetSnapshot(), vapiGtkPutImage(), vapiOriginal2Actual(), vCameraSettingsFree(), vFALSE, vImagesFree() e vImagesInit().

Referenciado por vapiGtkSetOriginWindowNewVapi(), vapiGtkSetOriginWindowSaveOrigin() e vapiGtkSetOriginWindowTestOrigin().

00087 {
00088         int NoteBookPage, CamIndex;
00089         vCameraSettings *CameraSettings;
00090         vImages *tempImages;
00091         const char *Filename, *IP, *URL;
00092 
00093         HaveAcquisitionLoadingProgress = vFALSE;
00094 
00095         if (SaveSettings)
00096         {
00097                 tempImages = SetOrigin->Images;
00098                 CameraSettings = SetOrigin->CameraSettings;
00099         }
00100         else
00101         {
00102                 tempImages = vImagesInit ();
00103                 CameraSettings = vapiCameraSettingsInit ();
00104 
00105         }
00106 
00107         NoteBookPage =
00108                 gtk_notebook_get_current_page ((GtkNotebook *) SetOrigin->
00109                                                nbCameraType);
00110 
00111         switch (NoteBookPage)
00112         {
00113         case 0:
00114         {
00115                 Filename =
00116                         gtk_entry_get_text ((GtkEntry *)
00117                                             SetOrigin->CamLocalFilePATH);
00118                 if (strlen (Filename) < 4)
00119                 {
00120                         return;
00121                 }
00122                 vapiCameraSettingsSetTypeLocalFile (CameraSettings, Filename);
00123                 break;
00124         }
00125 #ifndef VAPI_DEMO
00126         case 1:
00127         {
00128 
00129                 CamIndex =
00130                         gtk_spin_button_get_value_as_int ((GtkSpinButton *)
00131                                                           SetOrigin->
00132                                                           CamIndex);
00133                 vapiCameraSettingsSetTypeLocal (CameraSettings, CamIndex);
00134                 break;
00135         }
00136         case 2:
00137         {
00138                 IP = gtk_entry_get_text ((GtkEntry *) SetOrigin->CamIP);
00139                 URL = gtk_entry_get_text ((GtkEntry *) SetOrigin->CamURL);
00140                 vapiCameraSettingsSetTypeRemoteIP (CameraSettings, IP, URL);
00141                 break;
00142         }
00143 #endif
00144 
00145         }
00146 
00147         vapiGetSnapshot (tempImages, CameraSettings);
00148 
00149         vapiOriginal2Actual (tempImages);
00150 
00151 
00152         if (!SaveSettings)
00153         {
00154                 vapiGtkPutImage (SetOrigin->imOriginTest,
00155                                  tempImages->Original);
00156                 vImagesFree (tempImages);
00157                 vCameraSettingsFree (CameraSettings);
00158         }
00159 
00160 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSetOriginWindowUpdatePreview ( GtkFileChooser *  chooser,
GtkWidget *  ImPreview 
)

Definido na linha 217 do ficheiro vapiGtkSetOriginWindow.c.

Referenciado por vapiGtkSetOriginWindowLaunchImageLoad().

00219 {
00220         char *filename;
00221         GError *error = NULL;
00222         GdkPixbuf *image;
00223 
00224         filename = gtk_file_chooser_get_preview_filename (chooser);
00225         if (filename == NULL)
00226         {
00227                 return;
00228         }
00229         image = gdk_pixbuf_new_from_file_at_scale (filename, 260, -1, TRUE,
00230                                                    &error);
00231         if (image == NULL)
00232         {
00233                 return;
00234         }
00235         gtk_image_set_from_pixbuf ((GtkImage *) ImPreview, image);
00236         g_object_unref (image);
00237         g_free (filename);
00238 }

Here is the caller graph for this function:


Gerado em Tue Jul 24 10:36:55 2007 para Vapi por  doxygen 1.5.1