| 102 rgb->green = (int)round(rgba.green * 65535.0); |
102 rgb->green = (int)round(rgba.green * 65535.0); |
| 103 rgb->blue = (int)round(rgba.blue * 65535.0); |
103 rgb->blue = (int)round(rgba.blue * 65535.0); |
| 104 } |
104 } |
| 105 |
105 |
| 106 #endif /* 3.4.0 and gtk_color_chooser_ */ |
106 #endif /* 3.4.0 and gtk_color_chooser_ */ |
| |
107 |
| |
108 |
| |
109 #if GTK_CHECK_VERSION(3,0,0) |
| |
110 |
| |
111 static inline GtkWidget * |
| |
112 gtk_grid_table_new(guint rows, guint columns) |
| |
113 { |
| |
114 return gtk_grid_new(); |
| |
115 } |
| |
116 |
| |
117 static inline void |
| |
118 gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top, |
| |
119 gint width, gint height) |
| |
120 { |
| |
121 gtk_grid_attach(grid, child, left, top, width, height); |
| |
122 gtk_widget_set_hexpand(child, TRUE); |
| |
123 gtk_widget_set_vexpand(child, TRUE); |
| |
124 } |
| |
125 |
| |
126 #else /* 3.0.0 and gtk_grid_ */ |
| |
127 |
| |
128 #define GTK_GRID GTK_TABLE |
| |
129 #define GtkGrid GtkTable |
| |
130 |
| |
131 static inline GtkWidget * |
| |
132 gtk_grid_table_new(guint rows, guint columns) |
| |
133 { |
| |
134 return gtk_table_new(rows, columns, FALSE); |
| |
135 } |
| |
136 |
| |
137 static inline void |
| |
138 gtk_grid_set_row_spacing(GtkGrid *grid, guint spacing) |
| |
139 { |
| |
140 gtk_table_set_row_spacings(grid, spacing); |
| |
141 } |
| |
142 |
| |
143 static inline void |
| |
144 gtk_grid_set_column_spacing(GtkGrid *grid, guint spacing) |
| |
145 { |
| |
146 gtk_table_set_col_spacings(grid, spacing); |
| |
147 } |
| |
148 |
| |
149 static inline void |
| |
150 gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top, |
| |
151 gint width, gint height) |
| |
152 { |
| |
153 gtk_table_attach_defaults(grid, child, left, left + width, |
| |
154 top, top + height); |
| |
155 } |
| |
156 |
| |
157 #endif /* 3.0.0 and gtk_grid_ */ |
| 107 |
158 |
| 108 |
159 |
| 109 #if !GTK_CHECK_VERSION(3,2,0) |
160 #if !GTK_CHECK_VERSION(3,2,0) |
| 110 |
161 |
| 111 #define GTK_FONT_CHOOSER GTK_FONT_SELECTION_DIALOG |
162 #define GTK_FONT_CHOOSER GTK_FONT_SELECTION_DIALOG |