/media/New Volume/Edu/Sem 4/ITWS 1b/Project/pjt/myproj/openfile.c File Reference

#include <string.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <sqlite3.h>
#include <sys/types.h>

Go to the source code of this file.

Defines

#define BUFFER   4096
#define MAX_IMAGES   8

Functions

static int callback (void *NotUsed, int argc, char **argv, char **azColName)
 Standard callback function used to display the results in Sqlite3.
void setup_tables ()
 Function sets up the database tables, in Sqlite and fills in tha data in them.
gint view_button (GtkWidget *widget, GdkEvent *event, gpointer value)
 This funtion consists of the action that is to be performed when View button is clicked in the Main Window.
gint add_button (GtkWidget *widget, GdkEvent *event, gpointer value)
 This funtion consists of the action that is to be performed when Add button is clicked in the Main Window.
gint delete_button (GtkWidget *widget, GdkEvent *event, gpointer value)
 This funtion consists of the action that is to be performed when Delete button is clicked in the Main Window.
int main (int argc, char *argv[])
 This is the main function of the program.

Variables

sqlite3 * db1
GtkWidget * dialog
GtkWidget * table
GtkWidget * user
GtkWidget * real
GtkWidget * home
GtkWidget * lbl1
GtkWidget * lbl2
GtkWidget * lbl3
GtkWidget * button
GtkWidget * addbutton
GtkWidget * deletebutton
char filename [1000]
char filepath [100]

Define Documentation

#define BUFFER   4096

Definition at line 22 of file openfile.c.

Referenced by add_button(), delete_button(), and setup_tables().

#define MAX_IMAGES   8

Definition at line 23 of file openfile.c.


Function Documentation

gint add_button ( GtkWidget *  widget,
GdkEvent *  event,
gpointer  value 
)

This funtion consists of the action that is to be performed when Add button is clicked in the Main Window.

Definition at line 138 of file openfile.c.

References BUFFER, callback(), db1, filepath, home, real, and user.

Referenced by main().

static int callback ( void *  NotUsed,
int  argc,
char **  argv,
char **  azColName 
) [static]

Standard callback function used to display the results in Sqlite3.

Definition at line 40 of file openfile.c.

Referenced by add_button(), delete_button(), and setup_tables().

gint delete_button ( GtkWidget *  widget,
GdkEvent *  event,
gpointer  value 
)

This funtion consists of the action that is to be performed when Delete button is clicked in the Main Window.

Definition at line 190 of file openfile.c.

References BUFFER, callback(), db1, filename, filepath, real, and user.

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

This is the main function of the program.

This function is mostly used to create the interface for the application. This contains all the buttons , dialogs and labels.

Definition at line 239 of file openfile.c.

References add_button(), addbutton, button, delete_button(), deletebutton, dialog, filepath, home, lbl1, lbl2, lbl3, real, setup_tables(), table, user, and view_button().

void setup_tables (  ) 

Function sets up the database tables, in Sqlite and fills in tha data in them.

It creates a new database if such a database is missing, or appends to the tables if it exists.

Definition at line 59 of file openfile.c.

References BUFFER, callback(), and db1.

Referenced by main().

gint view_button ( GtkWidget *  widget,
GdkEvent *  event,
gpointer  value 
)

This funtion consists of the action that is to be performed when View button is clicked in the Main Window.

Definition at line 85 of file openfile.c.

References dialog.

Referenced by main().


Variable Documentation

GtkWidget * addbutton

Definition at line 30 of file openfile.c.

Referenced by main().

GtkWidget* button

Definition at line 30 of file openfile.c.

Referenced by main().

sqlite3* db1

Definition at line 26 of file openfile.c.

Referenced by add_button(), delete_button(), and setup_tables().

GtkWidget * deletebutton

Definition at line 30 of file openfile.c.

Referenced by main().

GtkWidget* dialog

Definition at line 28 of file openfile.c.

Referenced by main(), and view_button().

char filename[1000]

Definition at line 32 of file openfile.c.

Referenced by delete_button().

char filepath[100]

Definition at line 33 of file openfile.c.

Referenced by add_button(), delete_button(), and main().

GtkWidget * home

Definition at line 28 of file openfile.c.

Referenced by add_button(), and main().

GtkWidget* lbl1

Definition at line 29 of file openfile.c.

Referenced by main().

GtkWidget * lbl2

Definition at line 29 of file openfile.c.

Referenced by main().

GtkWidget * lbl3

Definition at line 29 of file openfile.c.

Referenced by main().

GtkWidget * real

Definition at line 28 of file openfile.c.

Referenced by add_button(), delete_button(), and main().

GtkWidget * table

Definition at line 28 of file openfile.c.

Referenced by main().

GtkWidget * user

Definition at line 28 of file openfile.c.

Referenced by add_button(), delete_button(), and main().

Generated on Mon Apr 11 07:21:12 2011 for ELibrary by  doxygen 1.6.3