user2132383
user2132383

Reputation: 227

How to open and save a file in gtk?

i am new to gtk. I am trying to make a simple text editor. I am using codeblocks as my ide.

After looking at the documentation for opening and saving at https://developer.gnome.org/gtk3/stable/GtkFileChooserDialog.html, the code snippet shown has used a function called open_file(filename). The compiler throws an error that the open_file() is undeclared.

Can someone please help me with the implementation of this function?

Upvotes: 2

Views: 6167

Answers (1)

andlabs
andlabs

Reputation: 11588

That code is just an example. open_file() in that case is provided by you. GTK+ has no file manipulation functions. GLib, which GTK+ is built on, does have file manipulation functions you can use, but you don't have to use them — you can use any other file manipulation API at your disposal.

Upvotes: 6

Related Questions