static VALUE rg_progress_pulse(VALUE self) { gtk_entry_progress_pulse(_SELF(self)); return self; }
static gboolean search_progress_idle(GtkEntry *entry) { gtk_entry_progress_pulse(entry); return TRUE; }
void setUri( GtkWidget *mainSearchBox, gpointer button){ //Checking if the web address already has http attached to if, if not it is attached to the address uri = gtk_entry_get_text(GTK_ENTRY(mainSearchBox)); //These if constructs ensure that the url is in order //If address is online or on user's machine if( (uri[0] == 'h' && uri[1] == 't' && uri[2] == 't' && uri[3] == 'p') || (uri[0] == 'f' && uri[1] == 'i' && uri[2] == 'l' && uri[3] == 'e')){ //The address is in the correct format uri = gtk_entry_get_text(GTK_ENTRY(mainSearchBox)); } else{ if( uri[0] == 'w' && uri[1] == 'w' && uri[2] == 'w'){ //address lacks http://, which is added gtk_entry_prepend_text(GTK_ENTRY(mainSearchBox),"http://"); uri = gtk_entry_get_text(GTK_ENTRY(mainSearchBox)); } else{ if( strstr(uri, ".com") && uri[0] != '.'){ //if address ends with .com like youtube.com gtk_entry_prepend_text(GTK_ENTRY(mainSearchBox),"http://www."); uri = gtk_entry_get_text(GTK_ENTRY(mainSearchBox)); } else{ //if address has none of the above, google is used to search for the user's text gtk_entry_prepend_text(GTK_ENTRY(mainSearchBox),"http://www.google.com/"); uri = gtk_entry_get_text(GTK_ENTRY(mainSearchBox)); } } } gtk_entry_progress_pulse(GTK_ENTRY(mainSearchBox)); }
static gboolean search_progress (gpointer data) { gtk_entry_progress_pulse (GTK_ENTRY (data)); return TRUE; }
void KamerHits( ) { char url[45]; strcpy(url,"http://www.last.fm/tag/cameroon"); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
void activate( GtkWidget* widget , gpointer* wid) { web[count] = GTK_WIDGET(wid); uri = gtk_entry_get_text(GTK_ENTRY(widget)); gtk_entry_progress_pulse(GTK_ENTRY(widget)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void HeroGame(GtkWidget* widget , gpointer* wid) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.horoscope.com/us/games/index-games.aspx"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
//Music void NijiaMusic() { char url[45]; strcpy(url,"http://www.last.fm/tag/nigermusic"); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
void Newso() { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.gistus.com/music"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void AmericaFun() { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://abc.go.com/shows/americas-funniest-home-videos"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void OtherSports(GtkWidget* widget, GdkEvent * event , gpointer UrlText) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.bbc.co.uk/sport/0/"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void Horosmov( ) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.gamespot.com/gallery/the-best-horror-movies-of-2015-so-far-ranked/2900-294/"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void AfricaMusic() { char url[45]; strcpy(url,"http://tooxclusive.com/"); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
void Basketball(GtkWidget* widget, GdkEvent * event , gpointer UrlText) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.supersport.com/basketball/nba?r=www"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
//games void RaceGame(GtkWidget* widget , gpointer* wid) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.thecargames.org/"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void Football(GtkWidget* widget, GdkEvent * event , gpointer UrlText) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.xscores.com/soccer/livescores/06-12"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void Resling(GtkWidget* widget, GdkEvent * event , gpointer UrlText) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.dailymotion.com/video/x2s29rs"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void Bollywood( ) { char url[45]; strcpy(url,"http://www.bollywood.com"); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
void KidGames( GtkWidget* widget , gpointer* wid) { gtk_entry_set_text(GTK_ENTRY(UrlText),"https://www.gofundme.com/blackberrycreek"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void HipHopMusic( ) { char url[45]; strcpy(url,"http://allhiphop.com/"); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
void WarGame(GtkWidget* widget , gpointer* wid) { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://armorgames.com/category/war-games"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
//fun void NijiaBoys() { gtk_entry_set_text(GTK_ENTRY(UrlText),"http://www.gq234.com/basketmouth-night-of-a-thousand-laughs-vol-19/"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void KidsMovies() { char url[45]; strcpy(url,"http://pbskids.org/video/"); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
//Movies void Nollywood( ) { char url[45]; strcpy(url,"http://www.nollywoodmovies.tv/files/index.php"); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
void AfricaFun() { gtk_entry_set_text(GTK_ENTRY(UrlText),"https://www.youtube.com/watch?v=sPLVhVutaHE"); gtk_widget_show_all(UrlText); uri = gtk_entry_get_text(GTK_ENTRY(UrlText)); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
void Home() { char url[200]="file://"; char name[200]; getcwd(name,200); strcat(name,"/bolf/bolfhome.html"); strcat(url,name); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),url); }
//Internet Functions void InputConnect( GtkWidget* widget,gpointer* wid) { /* char url[35]="http://"; Widget InputText = GTK_WIDGET(wid); uri = gtk_entry_get_text(GTK_ENTRY(InputText)); strcat(url,uri); gtk_entry_set_text(GTK_ENTRY(UrlText),url); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web),url); */ //Checking if the web address already has http attached to if, if not it is attached to the address Widget Input = GTK_WIDGET(wid); uri = gtk_entry_get_text(GTK_ENTRY(Input)); //These if constructs ensure that the url is in order //If address is online or on user's machine //seting the count of the notebook if( (uri[0] == 'h' && uri[1] == 't' && uri[2] == 't' && uri[3] == 'p') || (uri[0] == 'f' && uri[1] == 'i' && uri[2] == 'l' && uri[3] == 'e')){ //The address is in the correct format // uri = gtk_entry__text(GTK_ENTRY(InputText)); } else{ if( uri[0] == 'w' && uri[1] == 'w' && uri[2] == 'w'){ //address lacks http://, which is added gtk_entry_prepend_text(GTK_ENTRY(Input),"http://"); uri = gtk_entry_get_text(GTK_ENTRY(Input)); } else{ if( strstr(uri, ".com") && uri[0] != '.'){ //if address ends with .com like youtube.com gtk_entry_prepend_text(GTK_ENTRY(Input),"http://www."); uri = gtk_entry_get_text(GTK_ENTRY(Input)); } else{ //if address has none of the above, google is used to search for the user's text gtk_entry_prepend_text(GTK_ENTRY(Input),"http://www.google.com/"); uri = gtk_entry_get_text(GTK_ENTRY(Input)); } } } gtk_entry_set_text(GTK_ENTRY(UrlText),uri); //gtk_entry_set_text(GTK_ENTRY(Input),"."); gtk_entry_progress_pulse(GTK_ENTRY(UrlText)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web[count]),uri); }
static gboolean pulse_it (GtkWidget *widget) { guint pulse_id; if (GTK_IS_ENTRY (widget)) gtk_entry_progress_pulse (GTK_ENTRY (widget)); else gtk_progress_bar_pulse (GTK_PROGRESS_BAR (widget)); pulse_id = g_timeout_add (pulse_time, (GSourceFunc)pulse_it, widget); g_object_set_data_full (G_OBJECT (widget), "pulse_id", GUINT_TO_POINTER (pulse_id), remove_pulse); return G_SOURCE_REMOVE; }
void activate(GtkWidget* web_view, gpointer searchBox){ uri = gtk_entry_get_text(GTK_ENTRY(searchBox)); gtk_entry_progress_pulse(GTK_ENTRY(searchBox)); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view),uri); }
static gboolean search_progress (gpointer data) { gtk_entry_progress_pulse (GTK_ENTRY (data)); return G_SOURCE_CONTINUE; }