Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:42:08+00:00 2026-05-26T22:42:08+00:00

I am learning C and compiling the codes with GTK+. I have a simple

  • 0

I am learning C and compiling the codes with GTK+. I have a simple GTK+ of

#include <gtk/gtk.h>

int main( int argc, char *argv[])
{
  GtkWidget *window;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_widget_show(window);

  gtk_main();

  return 0;
}

Could you please give me a hint how can I insert C processing codes within this structure? For example, I want to read the content of a file and display within the gtk+ window.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:42:08+00:00Added an answer on May 26, 2026 at 10:42 pm

    You need to write a “callback” that will respond to some “event”.

    This is how all GUI frameworks work – they’re all “event driven”.

    The specific GTK+ 2.0 API is “g_signal_connect()”.

    Here’s a very simple example:

    http://zetcode.com/tutorials/gtktutorial/gtkevents/

    Here is a much more extensive tutorial:

    http://developer.gnome.org/gtk-tutorial/2.90/

    If you work through this tutorial – you’ll learn a lot of useful material about GTK+ – and quite possibly learn a lot of useful information about C, too.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm just learning java, and i meet some problems. Here we have simple factory
I'm learning about references and pointers, and something in the tutorial isn't compiling for
I am learning F#. I got the latest May 2009 CTP. Sometimes when compiling
Learning xml, Can anyone help me? I have following XML code: **<book lang=en>name of
I just started learning Python... I am writing a simple program that will take
I am learning about how compilers represent C++ programs in assembly. I have a
We have a new developer that is just now learning LinqToSql. While going over
When compiling the following code: void DoSomething(int Numbers[]) { int SomeArray[] = Numbers; }
I have started learning Haskell from Learn You a Haskell . In one of
I'm pretty new to java and really enjoying learning about it. I have made

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.