Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gui.cpp File Reference

GUI application for fetching and displaying GitHub user information. More...

#include "user.hpp"
#include <future>
#include <gtkmm.h>
#include <iostream>
#include <nlohmann/json.hpp>
#include <sstream>
#include <thread>
#include "style_css.hpp"

Go to the source code of this file.

Data Structures

class  GitHubUserFetcherWindow
 Main application window for the GitHub user fetcher GUI. More...
 

Functions

int main (int argc, char *argv[])
 Application entry point for the GUI.
 

Detailed Description

GUI application for fetching and displaying GitHub user information.

This file defines a GTK-based graphical user interface that allows users to input a GitHub username, fetch user information via HTTP, and display it as formatted JSON. The GUI is styled with embedded CSS.

Definition in file gui.cpp.

Function Documentation

◆ main()

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

Application entry point for the GUI.

Initializes and runs the GTK application, creating a single main window.

Parameters
argcArgument count.
argvArgument vector.
Returns
Exit code.

Definition at line 147 of file gui.cpp.

147 { // NOLINT(cppcoreguidelines-avoid-c-arrays)
148 auto app = Gtk::Application::create("com.example.githubuserfetcher");
149
150 app->signal_activate().connect([&]() {
151 static GitHubUserFetcherWindow window;
152 app->add_window(window);
153 window.present();
154 });
155
156 return app->run(argc, argv);
157}
Main application window for the GitHub user fetcher GUI.
Definition gui.cpp:39