GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Nov 22, 2014 3:21 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Opaque Structure?
PostPosted: Thu Aug 27, 2009 2:12 pm 
Offline
Familiar Face

Joined: Wed Aug 26, 2009 1:18 pm
Posts: 32
i noticed in the gtk documentation, they use the term "Opaque Structure" or "opaque pointer". In context, i doesn't seem like they are talking about a transparency level. So, what do they mean by this?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 27, 2009 2:56 pm 
Offline
Never Seen the Sunlight

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

This only means that structure elements should not be manipulated directly. Instead, you should always use accessor functions provided by API.

For example, GObject is a structure that has a ref_count member. And since GObject is opaque structure, you should only use g_object_ref/unref/... family of function to manipulate this structure member.

(In C++, structures that are opaque would be objects with private data only.)

Tadej


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

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group