glade2c

- comparison

Comparison to libglade and gtk-builder

Running glade2c with make

glade2c is primary intended to run through make (or any other build program).

The different files

For each glade/gtk-builder file at least three source files needs to be written. By default they are called callbacks.h, interface.c and interface.h (but the names can be changed in the glade project file or from the command line).

Invoking glade2c

By default glade2c tries to do the same thing glade 2 does then pressing the "write source" button. Like glade 2 it reads its setings from the glade project file. If no such file is found (which is the case then using glade 3) the default values are used. You can either create a glade project file by hand or pass the values you want to change on the command line.

You can specify a subset of files to write if you don't want to write them all in the same run.

Examples

If you have a glade project file or accepts the default values:

  myapplication: main.o interface.o
          gcc -o $@ @^

  callbacks.h interface.c interface.h: myinterface.glade
          glade2c $<

If you want to use a specific project file:

  callbacks.h interface.c interface.h: myinterface.glade myproject.gladep
          glade2c $< --project=myproject.gladep

If you prefer different rules for each file:

  callbacks.h: myinterface.glade
          glade2c $< --write-callbacks-header

  interface.c: myinterface.glade
          glade2c $< --write-interface-source

  interface.h: myinterface.glade
          glade2c $< --write-interface-header

snisurset.netContact the author.