/* Display the login frame */ void display_frame() { TRACE(stdout, "%s", "Displaying login frame application..."); /* Create the login frame */ frame.gui.win = gtk_window_new(GTK_WINDOW_POPUP); frame.gui.widg = gtk_drawing_area_new(); setup_app_settings(&frame, FRAME_CONFIG, NULL, NULL); set_app(&frame); g_signal_connect(frame.gui.widg, "draw", (void*)draw_window, NULL); TRACE(stdout, "%s", "Done displaying frame."); }
/* Display items in the button panel */ static void display_item(struct elyapp *app, void (*func)()) { TRACE(stdout, "%s", "Displaying panel item..."); /* Create the panel button items */ app->gui.win = gtk_window_new(GTK_WINDOW_TOPLEVEL); app->gui.widg = gtk_button_new(); set_app(app); g_signal_connect(app->gui.widg, "clicked", G_CALLBACK(func), NULL); set_app_style(app, app->gui.win); set_app_style(app, app->gui.widg); setup_button(app->gui.widg, app->shape.img); TRACE(stdout, "%s", "Done displaying panel item."); }
/* ******************************** * ***** DISPLAY LOGIN FIELDS ***** * ******************************** */ void display_login() { TRACE(stdout, "%s", "Displaying password entry box application..."); /* Create the password entry box */ user.gui.win = gtk_window_new(GTK_WINDOW_TOPLEVEL); pass.gui.win = gtk_window_new(GTK_WINDOW_TOPLEVEL); signin.gui.win = gtk_window_new(GTK_WINDOW_TOPLEVEL); user.gui.widg = gtk_entry_new(); pass.gui.widg = gtk_entry_new(); signin.gui.widg = gtk_button_new_with_label("Log in"); setup_app_settings(&user, USER_CONFIG, USER_STYLE, "Username"); setup_app_settings(&pass, PASS_CONFIG, PASS_STYLE, "Password"); setup_app_settings(&signin, SIGNIN_CONFIG, SIGNIN_STYLE, "Signin"); set_app(&user); set_app(&pass); set_app(&signin); g_signal_connect(user.gui.widg, "activate", G_CALLBACK(get_login), NULL); g_signal_connect(pass.gui.widg, "activate", G_CALLBACK(get_login), NULL); g_signal_connect(signin.gui.widg, "clicked", G_CALLBACK(get_login), NULL); g_signal_connect(user.gui.widg, "key-press-event", G_CALLBACK(set_login_focus), pass.gui.widg); g_signal_connect(pass.gui.widg, "key-press-event", G_CALLBACK(set_login_focus), signin.gui.widg); setup_entry(&user, user.settings.class); setup_entry(&pass, pass.settings.class); set_app_style(&user, user.gui.widg); set_app_style(&pass, pass.gui.widg); set_app_style(&signin, signin.gui.widg); set_app_style(&user, user.gui.win); set_app_style(&pass, pass.gui.win); set_app_style(&signin, signin.gui.win); TRACE(stdout, "%s", "Done displaying password entry box."); }
// only for dev int main(int argc, char *argv[]) { // call QStringList command; for(int i=1; i<argc; i++) { command.append(QString("%1").arg(argv[i])); } // command.append("function"); // command.append("my"); // command.append("arg_2"); // command.append("arg_3"); qDebug() << "Return: " << set_app(command) << endl; return 0; }