| 170 */ |
170 */ |
| 171 void gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height); |
171 void gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height); |
| 172 |
172 |
| 173 /** |
173 /** |
| 174 * Hide a widget. |
174 * Hide a widget. |
| 175 * @param widget The widget to hide. |
175 * @widget: The widget to hide. |
| 176 */ |
176 */ |
| 177 void gnt_widget_hide(GntWidget *widget); |
177 void gnt_widget_hide(GntWidget *widget); |
| 178 |
178 |
| 179 /** |
179 /** |
| 180 * Get the position of a widget. |
180 * Get the position of a widget. |
| 181 * |
181 * |
| 182 * @param widget The widget. |
182 * @widget: The widget. |
| 183 * @param x Location to store the x-coordinate of the widget. |
183 * @x: Location to store the x-coordinate of the widget. |
| 184 * @param y Location to store the y-coordinate of the widget. |
184 * @y: Location to store the y-coordinate of the widget. |
| 185 */ |
185 */ |
| 186 void gnt_widget_get_position(GntWidget *widget, int *x, int *y); |
186 void gnt_widget_get_position(GntWidget *widget, int *x, int *y); |
| 187 |
187 |
| 188 /** |
188 /** |
| 189 * Set the position of a widget. |
189 * Set the position of a widget. |
| 190 * @param widget The widget to reposition. |
190 * @widget: The widget to reposition. |
| 191 * @param x The x-coordinate of the widget. |
191 * @x: The x-coordinate of the widget. |
| 192 * @param y The x-coordinate of the widget. |
192 * @y: The x-coordinate of the widget. |
| 193 */ |
193 */ |
| 194 void gnt_widget_set_position(GntWidget *widget, int x, int y); |
194 void gnt_widget_set_position(GntWidget *widget, int x, int y); |
| 195 |
195 |
| 196 /** |
196 /** |
| 197 * Request a widget to calculate its desired size. |
197 * Request a widget to calculate its desired size. |
| 198 * @param widget The widget. |
198 * @widget: The widget. |
| 199 */ |
199 */ |
| 200 void gnt_widget_size_request(GntWidget *widget); |
200 void gnt_widget_size_request(GntWidget *widget); |
| 201 |
201 |
| 202 /** |
202 /** |
| 203 * Get the size of a widget. |
203 * Get the size of a widget. |
| 204 * @param widget The widget. |
204 * @widget: The widget. |
| 205 * @param width Location to store the width of the widget. |
205 * @width: Location to store the width of the widget. |
| 206 * @param height Location to store the height of the widget. |
206 * @height: Location to store the height of the widget. |
| 207 */ |
207 */ |
| 208 void gnt_widget_get_size(GntWidget *widget, int *width, int *height); |
208 void gnt_widget_get_size(GntWidget *widget, int *width, int *height); |
| 209 |
209 |
| 210 /** |
210 /** |
| 211 * Set the size of a widget. |
211 * Set the size of a widget. |
| 212 * |
212 * |
| 213 * @param widget The widget to resize. |
213 * @widget: The widget to resize. |
| 214 * @param width The width of the widget. |
214 * @width: The width of the widget. |
| 215 * @param height The height of the widget. |
215 * @height: The height of the widget. |
| 216 * |
216 * |
| 217 * @return If the widget was resized to the new size. |
217 * Returns: If the widget was resized to the new size. |
| 218 */ |
218 */ |
| 219 gboolean gnt_widget_set_size(GntWidget *widget, int width, int height); |
219 gboolean gnt_widget_set_size(GntWidget *widget, int width, int height); |
| 220 |
220 |
| 221 /** |
221 /** |
| 222 * Confirm a requested a size for a widget. |
222 * Confirm a requested a size for a widget. |
| 223 * |
223 * |
| 224 * @param widget The widget. |
224 * @widget: The widget. |
| 225 * @param width The requested width. |
225 * @width: The requested width. |
| 226 * @param height The requested height. |
226 * @height: The requested height. |
| 227 * |
227 * |
| 228 * @return @c TRUE if the new size was confirmed, @c FALSE otherwise. |
228 * Returns: %TRUE if the new size was confirmed, %FALSE otherwise. |
| 229 */ |
229 */ |
| 230 gboolean gnt_widget_confirm_size(GntWidget *widget, int width, int height); |
230 gboolean gnt_widget_confirm_size(GntWidget *widget, int width, int height); |
| 231 |
231 |
| 232 /** |
232 /** |
| 233 * Trigger the key-press callbacks for a widget. |
233 * Trigger the key-press callbacks for a widget. |
| 234 * |
234 * |
| 235 * @param widget The widget. |
235 * @widget: The widget. |
| 236 * @param keys The keypress on the widget. |
236 * @keys: The keypress on the widget. |
| 237 * |
237 * |
| 238 * @return @c TRUE if the key-press was handled, @c FALSE otherwise. |
238 * Returns: %TRUE if the key-press was handled, %FALSE otherwise. |
| 239 */ |
239 */ |
| 240 gboolean gnt_widget_key_pressed(GntWidget *widget, const char *keys); |
240 gboolean gnt_widget_key_pressed(GntWidget *widget, const char *keys); |
| 241 |
241 |
| 242 /** |
242 /** |
| 243 * Trigger the 'click' callback of a widget. |
243 * Trigger the 'click' callback of a widget. |
| 244 * |
244 * |
| 245 * @param widget The widget. |
245 * @widget: The widget. |
| 246 * @param event The mouseevent. |
246 * @event: The mouseevent. |
| 247 * @param x The x-coordinate of the mouse. |
247 * @x: The x-coordinate of the mouse. |
| 248 * @param y The y-coordinate of the mouse. |
248 * @y: The y-coordinate of the mouse. |
| 249 * |
249 * |
| 250 * @return @c TRUE if the event was handled, @c FALSE otherwise. |
250 * Returns: %TRUE if the event was handled, %FALSE otherwise. |
| 251 */ |
251 */ |
| 252 gboolean gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y); |
252 gboolean gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y); |
| 253 |
253 |
| 254 /** |
254 /** |
| 255 * Give or remove focus to a widget. |
255 * Give or remove focus to a widget. |
| 256 * @param widget The widget. |
256 * @widget: The widget. |
| 257 * @param set @c TRUE of focus should be given to the widget, @c FALSE if |
257 * @set: %TRUE of focus should be given to the widget, %FALSE if |
| 258 * focus should be removed. |
258 * focus should be removed. |
| 259 * |
259 * |
| 260 * @return @c TRUE if the focus has been changed, @c FALSE otherwise. |
260 * Returns: %TRUE if the focus has been changed, %FALSE otherwise. |
| 261 */ |
261 */ |
| 262 gboolean gnt_widget_set_focus(GntWidget *widget, gboolean set); |
262 gboolean gnt_widget_set_focus(GntWidget *widget, gboolean set); |
| 263 |
263 |
| 264 /** |
264 /** |
| 265 * Activate a widget. This only applies to widgets that can be activated (eg. GntButton) |
265 * Activate a widget. This only applies to widgets that can be activated (eg. GntButton) |
| 266 * @param widget The widget to activate. |
266 * @widget: The widget to activate. |
| 267 */ |
267 */ |
| 268 void gnt_widget_activate(GntWidget *widget); |
268 void gnt_widget_activate(GntWidget *widget); |
| 269 |
269 |
| 270 /** |
270 /** |
| 271 * Set the name of a widget. |
271 * Set the name of a widget. |
| 272 * @param widget The widget. |
272 * @widget: The widget. |
| 273 * @param name A new name for the widget. |
273 * @name: A new name for the widget. |
| 274 */ |
274 */ |
| 275 void gnt_widget_set_name(GntWidget *widget, const char *name); |
275 void gnt_widget_set_name(GntWidget *widget, const char *name); |
| 276 |
276 |
| 277 /** |
277 /** |
| 278 * Get the name of a widget. |
278 * Get the name of a widget. |
| 279 * @param widget The widget. |
279 * @widget: The widget. |
| 280 * @return The name of the widget. |
280 * Returns: The name of the widget. |
| 281 */ |
281 */ |
| 282 const char *gnt_widget_get_name(GntWidget *widget); |
282 const char *gnt_widget_get_name(GntWidget *widget); |
| 283 |
283 |
| 284 /** |
284 /** |
| 285 * @internal |
285 * @internal |
| 288 void gnt_widget_queue_update(GntWidget *widget); |
288 void gnt_widget_queue_update(GntWidget *widget); |
| 289 |
289 |
| 290 /** |
290 /** |
| 291 * Set whether a widget can take focus or not. |
291 * Set whether a widget can take focus or not. |
| 292 * |
292 * |
| 293 * @param widget The widget. |
293 * @widget: The widget. |
| 294 * @param set @c TRUE if the widget can take focus. |
294 * @set: %TRUE if the widget can take focus. |
| 295 */ |
295 */ |
| 296 void gnt_widget_set_take_focus(GntWidget *widget, gboolean set); |
296 void gnt_widget_set_take_focus(GntWidget *widget, gboolean set); |
| 297 |
297 |
| 298 /** |
298 /** |
| 299 * Set the visibility of a widget. |
299 * Set the visibility of a widget. |
| 300 * |
300 * |
| 301 * @param widget The widget. |
301 * @widget: The widget. |
| 302 * @param set Whether the widget is visible or not. |
302 * @set: Whether the widget is visible or not. |
| 303 */ |
303 */ |
| 304 void gnt_widget_set_visible(GntWidget *widget, gboolean set); |
304 void gnt_widget_set_visible(GntWidget *widget, gboolean set); |
| 305 |
305 |
| 306 /** |
306 /** |
| 307 * Check whether the widget has shadows. |
307 * Check whether the widget has shadows. |
| 308 * |
308 * |
| 309 * @param widget The widget. |
309 * @widget: The widget. |
| 310 * |
310 * |
| 311 * @return @c TRUE if the widget has shadows. This checks both the user-setting |
311 * Returns: %TRUE if the widget has shadows. This checks both the user-setting |
| 312 * and whether the widget can have shadows at all. |
312 * and whether the widget can have shadows at all. |
| 313 */ |
313 */ |
| 314 gboolean gnt_widget_has_shadow(GntWidget *widget); |
314 gboolean gnt_widget_has_shadow(GntWidget *widget); |
| 315 |
315 |
| 316 G_END_DECLS |
316 G_END_DECLS |