GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Aug 01, 2014 1:52 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: any working exmaple of glib-mkenums?
PostPosted: Sat Feb 25, 2012 8:26 pm 
Offline
Familiar Face

Joined: Thu Jan 12, 2012 7:44 pm
Posts: 7
Hello,

I just want to define a new enum type with gobject. The documentation points me to glib-mkenums, but even after reading the reference page of the tool, I have totally no idea of how to use this tool. I also can't find any example of how to use it in the internet.

Is there any example available or could someone explain it? It'd be awesome!


Top
 Profile  
 
 Post subject: Re: any working exmaple of glib-mkenums?
PostPosted: Sat Feb 25, 2012 9:10 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Could you describe exactly how you want your enum to be set up? In a large number of cases you won need to use gobject/gtype. This can be more simply done in c by typedefs of macros and their numeric values.


Top
 Profile  
 
 Post subject: Re: any working exmaple of glib-mkenums?
PostPosted: Mon Feb 27, 2012 9:31 am 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hello.

GEdit is one of the apps that uses this facility. Have a look here for sample code (files of interest are gedit-enum-types.c.template, gedit-enum-types.h.template and Makefile.am).

Cheers,
Tadej


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group