Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Upp 2007.1beta2 released
Re: Upp 2007.1beta2 released [message #7839 is a reply to message #7837] Thu, 25 January 2007 12:28 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
guido wrote on Thu, 25 January 2007 06:10


Didn't understand how you calculated the style offset, as the data we are interested in starts right at offset 0.



I am afraid this is not correct. The structure we are interested in is GtkStyle. While API docs list is as if offset is 0, in .h there is:

struct _GtkStyle
{
  GObject parent_instance;

  /*< public >*/
  
  GdkColor fg[5];
  GdkColor bg[5];
  GdkColor light[5];
  GdkColor dark[5];
  GdkColor mid[5];
  GdkColor text[5];
  GdkColor base[5];
  GdkColor text_aa[5];		/* Halfway between text/base */
  
  GdkColor black;
  GdkColor white;
  PangoFontDescription *font_desc;
  
  gint xthickness;
  gint ythickness;
  
  GdkGC *fg_gc[5];
  GdkGC *bg_gc[5];
  GdkGC *light_gc[5];
  GdkGC *dark_gc[5];
  GdkGC *mid_gc[5];
  GdkGC *text_gc[5];
  GdkGC *base_gc[5];
  GdkGC *text_aa_gc[5];
  GdkGC *black_gc;
  GdkGC *white_gc;
  
  GdkPixmap *bg_pixmap[5];

  /*< private >*/
  
  gint attach_count;
  
  gint depth;
  GdkColormap *colormap;
  GdkFont *private_font;
  PangoFontDescription *private_font_desc; /* Font description for style->private_font or %NULL */
  
  /* the RcStyle from which this style was created */
  GtkRcStyle	 *rc_style;

  GSList	 *styles;	  /* of type GtkStyle* */
  GArray	 *property_cache;
  GSList         *icon_factories; /* of type GtkIconFactory* */
};


I agree that introducing fixed offset is too fragile solution. I am afraid that only correct way is to include gtk headers. Very unhappy about that...

(Alternative solution would be to check gtk version and have table of offsets.... but that is quite fragile as well).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Forum email trouble....
Next Topic: Upp 2007.2rc1 released
Goto Forum:
  


Current Time: Sat May 04 06:37:26 CEST 2024

Total time taken to generate the page: 0.03454 seconds