Chinaunix首页 | 论坛 | 博客
  • 博客访问: 465634
  • 博文数量: 88
  • 博客积分: 1677
  • 博客等级: 上尉
  • 技术积分: 667
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-03 22:17
文章分类

全部博文(88)

文章存档

2013年(1)

2012年(18)

2011年(69)

分类: 嵌入式

2011-11-25 17:26:44

GtkWidget结构的定义
2008-05-04 11:25
GtkWidget结构定义
typedef struct {
/*
* The style for the widget. The style contains the
* colors the widget should be drawn in for each state
* along with graphics contexts used to draw with and
* the font to use for text.
*/
GtkStyle *style;

/*
* The widget's desired size.
*/
GtkRequisition requisition;

/*
* The widget's allocated size.
*/
GtkAllocation allocation;

/*
* The widget's window or its parent window if it does
* not have a window. (Which will be indicated by the
* GTK_NO_WINDOW flag being set).
*/
GdkWindow *window;

/*
* The widget's parent.
*/
GtkWidget *parent;
} GtkWidget;

====================================================================================
GtkStyle结构定义(使用gtk_widget_get_style可以获得指定构件所采用的样式)
typedef struct {
   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;
阅读(4744) | 评论(0) | 转发(0) |
0

上一篇:窗口构件

下一篇:GTK+构件的创建

给主人留下些什么吧!~~