]> git.saurik.com Git - wxWidgets.git/blame - src/gtk/win_gtk.c
* prgodlgg.h: Update() use wxString instead of 'char *'
[wxWidgets.git] / src / gtk / win_gtk.c
CommitLineData
c67daf87 1/* ///////////////////////////////////////////////////////////////////////////
c67d8618 2// Name: win_gtk.c
01111366 3// Purpose: native GTK+ widget for wxWindows
c801d85f 4// Author: Robert Roebling
c67d8618 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
c801d85f 7// Licence: wxWindows licence
c67daf87 8/////////////////////////////////////////////////////////////////////////// */
c801d85f
KB
9
10#include "wx/gtk/win_gtk.h"
034be888 11#include "gtk/gtksignal.h"
bbf7db28 12#include "gtk/gtknotebook.h"
38c7b3d3 13
c801d85f
KB
14#ifdef __cplusplus
15extern "C" {
16#endif /* __cplusplus */
17
18static void gtk_myfixed_class_init (GtkMyFixedClass *klass);
19static void gtk_myfixed_init (GtkMyFixed *myfixed);
20static void gtk_myfixed_map (GtkWidget *widget);
034be888 21#if (GTK_MINOR_VERSION == 0)
c801d85f 22static void gtk_myfixed_unmap (GtkWidget *widget);
38c7b3d3 23#endif
c801d85f
KB
24static void gtk_myfixed_realize (GtkWidget *widget);
25static void gtk_myfixed_size_request (GtkWidget *widget,
26 GtkRequisition *requisition);
27static void gtk_myfixed_size_allocate (GtkWidget *widget,
28 GtkAllocation *allocation);
29static void gtk_myfixed_paint (GtkWidget *widget,
30 GdkRectangle *area);
31static void gtk_myfixed_draw (GtkWidget *widget,
32 GdkRectangle *area);
33static gint gtk_myfixed_expose (GtkWidget *widget,
34 GdkEventExpose *event);
35static void gtk_myfixed_add (GtkContainer *container,
36 GtkWidget *widget);
37static void gtk_myfixed_remove (GtkContainer *container,
38 GtkWidget *widget);
39static void gtk_myfixed_foreach (GtkContainer *container,
d345e841 40#if (GTK_MINOR_VERSION > 0)
75ed1d15
GL
41 gboolean include_internals,
42#endif
c801d85f
KB
43 GtkCallback callback,
44 gpointer callback_data);
034be888 45#if (GTK_MINOR_VERSION > 0)
38c7b3d3
RR
46static GtkType gtk_myfixed_child_type (GtkContainer *container);
47#endif
c801d85f 48
034be888
RR
49#if (GTK_MINOR_VERSION > 0)
50static void gtk_myfixed_scroll_set_adjustments (GtkMyFixed *myfixed,
51 GtkAdjustment *hadj,
52 GtkAdjustment *vadj);
53#endif
c801d85f 54
c801d85f
KB
55
56
034be888
RR
57static GtkContainerClass *parent_class = NULL;
58
c801d85f
KB
59guint
60gtk_myfixed_get_type ()
61{
62 static guint myfixed_type = 0;
63
64 if (!myfixed_type)
65 {
66 GtkTypeInfo myfixed_info =
67 {
68 "GtkMyFixed",
69 sizeof (GtkMyFixed),
70 sizeof (GtkMyFixedClass),
71 (GtkClassInitFunc) gtk_myfixed_class_init,
72 (GtkObjectInitFunc) gtk_myfixed_init,
034be888 73#if (GTK_MINOR_VERSION > 0)
38c7b3d3
RR
74 /* reserved_1 */ NULL,
75 /* reserved_2 */ NULL,
76 (GtkClassInitFunc) NULL,
034be888
RR
77#else
78 (GtkArgSetFunc) NULL,
79 (GtkArgGetFunc) NULL,
38c7b3d3 80#endif
c801d85f
KB
81 };
82
83 myfixed_type = gtk_type_unique (gtk_container_get_type (), &myfixed_info);
84 }
85
86 return myfixed_type;
87}
88
89static void
90gtk_myfixed_class_init (GtkMyFixedClass *klass)
91{
92 GtkObjectClass *object_class;
93 GtkWidgetClass *widget_class;
94 GtkContainerClass *container_class;
95
96 object_class = (GtkObjectClass*) klass;
97 widget_class = (GtkWidgetClass*) klass;
98 container_class = (GtkContainerClass*) klass;
f5368809 99
034be888 100#if (GTK_MINOR_VERSION > 0)
38c7b3d3 101 parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
034be888
RR
102#else
103 parent_class = gtk_type_class (gtk_container_get_type ());
38c7b3d3 104#endif
c801d85f
KB
105
106 widget_class->map = gtk_myfixed_map;
034be888 107#if (GTK_MINOR_VERSION == 0)
c801d85f 108 widget_class->unmap = gtk_myfixed_unmap;
38c7b3d3 109#endif
c801d85f
KB
110 widget_class->realize = gtk_myfixed_realize;
111 widget_class->size_request = gtk_myfixed_size_request;
112 widget_class->size_allocate = gtk_myfixed_size_allocate;
113 widget_class->draw = gtk_myfixed_draw;
114 widget_class->expose_event = gtk_myfixed_expose;
115
116 container_class->add = gtk_myfixed_add;
117 container_class->remove = gtk_myfixed_remove;
d345e841 118#if (GTK_MINOR_VERSION > 0)
75ed1d15
GL
119 container_class->forall = gtk_myfixed_foreach;
120#else
c801d85f 121 container_class->foreach = gtk_myfixed_foreach;
75ed1d15 122#endif
38c7b3d3 123
034be888 124#if (GTK_MINOR_VERSION > 0)
38c7b3d3
RR
125 container_class->child_type = gtk_myfixed_child_type;
126#endif
034be888
RR
127
128#if (GTK_MINOR_VERSION > 0)
129 klass->set_scroll_adjustments = gtk_myfixed_scroll_set_adjustments;
130
131 widget_class->set_scroll_adjustments_signal =
132 gtk_signal_new ("set_scroll_adjustments",
133 GTK_RUN_LAST,
134 object_class->type,
135 GTK_SIGNAL_OFFSET (GtkMyFixedClass, set_scroll_adjustments),
136 gtk_marshal_NONE__POINTER_POINTER,
137 GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
138#endif
38c7b3d3
RR
139}
140
034be888 141#if (GTK_MINOR_VERSION > 0)
38c7b3d3
RR
142static GtkType
143gtk_myfixed_child_type (GtkContainer *container)
144{
145 return GTK_TYPE_WIDGET;
c801d85f 146}
38c7b3d3 147#endif
c801d85f
KB
148
149static void
150gtk_myfixed_init (GtkMyFixed *myfixed)
151{
152 GTK_WIDGET_UNSET_FLAGS (myfixed, GTK_NO_WINDOW);
38c7b3d3 153
034be888 154#if (GTK_MINOR_VERSION == 0)
c801d85f 155 GTK_WIDGET_SET_FLAGS (myfixed, GTK_BASIC);
38c7b3d3 156#endif
f5368809 157
034be888
RR
158#if (GTK_MINOR_VERSION > 0)
159 myfixed->shadow_type = GTK_SHADOW_NONE;
160#endif
161
c801d85f
KB
162 myfixed->children = NULL;
163}
164
165GtkWidget*
166gtk_myfixed_new ()
167{
168 GtkMyFixed *myfixed;
169
170 myfixed = gtk_type_new (gtk_myfixed_get_type ());
171
c801d85f
KB
172 return GTK_WIDGET (myfixed);
173}
174
034be888
RR
175#if (GTK_MINOR_VERSION > 0)
176void gtk_myfixed_scroll_set_adjustments (GtkMyFixed *myfixed,
177 GtkAdjustment *hadj,
178 GtkAdjustment *vadj)
179{
180 /* OK, this is embarassing, but this function has to be here */
181}
182
183void
184gtk_myfixed_set_shadow_type (GtkMyFixed *myfixed,
185 GtkShadowType type)
186{
187 g_return_if_fail (myfixed != NULL);
188 g_return_if_fail (GTK_IS_MYFIXED (myfixed));
189
190 if ((GtkShadowType) myfixed->shadow_type != type)
191 {
192 myfixed->shadow_type = type;
193
194 if (GTK_WIDGET_VISIBLE (myfixed))
195 {
196 gtk_widget_size_allocate (GTK_WIDGET (myfixed), &(GTK_WIDGET (myfixed)->allocation));
197 gtk_widget_queue_draw (GTK_WIDGET (myfixed));
198 }
199 }
200}
201#endif
202
c801d85f 203void
034be888 204gtk_myfixed_put (GtkMyFixed *myfixed,
fdd3ed7a
RR
205 GtkWidget *widget,
206 gint16 x,
207 gint16 y,
208 gint16 width,
209 gint16 height)
c801d85f
KB
210{
211 GtkMyFixedChild *child_info;
212
213 g_return_if_fail (myfixed != NULL);
214 g_return_if_fail (GTK_IS_MYFIXED (myfixed));
215 g_return_if_fail (widget != NULL);
216
217 child_info = g_new (GtkMyFixedChild, 1);
218 child_info->widget = widget;
11026f7b
RR
219 child_info->x = x;
220 child_info->y = y;
fdd3ed7a
RR
221 child_info->width = width;
222 child_info->height = height;
d4c99d6f 223
c801d85f
KB
224 gtk_widget_set_parent (widget, GTK_WIDGET (myfixed));
225
226 myfixed->children = g_list_append (myfixed->children, child_info);
227
228 if (GTK_WIDGET_REALIZED (myfixed) && !GTK_WIDGET_REALIZED (widget))
229 gtk_widget_realize (widget);
230
231 if (GTK_WIDGET_MAPPED (myfixed) && !GTK_WIDGET_MAPPED (widget))
232 gtk_widget_map (widget);
233
234 if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed))
235 gtk_widget_queue_resize (GTK_WIDGET (myfixed));
236}
237
238void
fdd3ed7a
RR
239gtk_myfixed_move (GtkMyFixed *myfixed,
240 GtkWidget *widget,
241 gint16 x,
242 gint16 y)
c801d85f
KB
243{
244 GtkMyFixedChild *child;
245 GList *children;
246
247 g_return_if_fail (myfixed != NULL);
248 g_return_if_fail (GTK_IS_MYFIXED (myfixed));
249 g_return_if_fail (widget != NULL);
250
fdd3ed7a
RR
251 children = myfixed->children;
252 while (children)
253 {
254 child = children->data;
255 children = children->next;
256
257 if (child->widget == widget)
258 {
259 gtk_myfixed_set_size( myfixed, widget, x, y, child->width, child->height );
260 break;
261 }
262 }
263}
264
265void
266gtk_myfixed_resize (GtkMyFixed *myfixed,
267 GtkWidget *widget,
268 gint16 width,
269 gint16 height)
270{
271 GtkMyFixedChild *child;
272 GList *children;
273
274 g_return_if_fail (myfixed != NULL);
275 g_return_if_fail (GTK_IS_MYFIXED (myfixed));
276 g_return_if_fail (widget != NULL);
277
278 children = myfixed->children;
279 while (children)
280 {
281 child = children->data;
282 children = children->next;
283
284 if (child->widget == widget)
285 {
286 gtk_myfixed_set_size( myfixed, widget, child->x, child->y, width, height );
287 break;
288 }
289 }
290}
291
292void
293gtk_myfixed_set_size (GtkMyFixed *myfixed,
294 GtkWidget *widget,
295 gint16 x,
296 gint16 y,
297 gint16 width,
298 gint16 height)
299{
300 GtkMyFixedChild *child;
301 GList *children;
302 GtkAllocation child_allocation;
303
304 g_return_if_fail (myfixed != NULL);
305 g_return_if_fail (GTK_IS_MYFIXED (myfixed));
306 g_return_if_fail (widget != NULL);
307
c801d85f
KB
308 children = myfixed->children;
309 while (children)
310 {
311 child = children->data;
312 children = children->next;
313
314 if (child->widget == widget)
315 {
fdd3ed7a
RR
316 if ((child->x == x) &&
317 (child->y == y) &&
318 (child->width == width) &&
319 (child->height == height)) return;
fb1585ae 320
11026f7b
RR
321 child->x = x;
322 child->y = y;
fdd3ed7a
RR
323 child->width = width;
324 child->height = height;
c801d85f
KB
325
326 if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed))
fdd3ed7a
RR
327 {
328 if ((child->width > 1) && (child->height > 1) && (GTK_WIDGET_REALIZED(widget)))
329 {
330 child_allocation.x = child->x;
331 child_allocation.y = child->y;
332 child_allocation.width = child->width;
333 child_allocation.height = child->height;
334 gtk_widget_size_allocate (widget, &child_allocation);
335 }
336 else
337 {
338 gtk_widget_queue_resize (GTK_WIDGET (myfixed));
339 }
340 }
c801d85f
KB
341
342 break;
343 }
344 }
345}
346
347static void
348gtk_myfixed_map (GtkWidget *widget)
349{
350 GtkMyFixed *myfixed;
351 GtkMyFixedChild *child;
352 GList *children;
353
354 g_return_if_fail (widget != NULL);
355 g_return_if_fail (GTK_IS_MYFIXED (widget));
356
357 GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
358 myfixed = GTK_MYFIXED (widget);
359
360 gdk_window_show (widget->window);
361
362 children = myfixed->children;
363 while (children)
364 {
365 child = children->data;
366 children = children->next;
367
368 if (GTK_WIDGET_VISIBLE (child->widget) &&
369 !GTK_WIDGET_MAPPED (child->widget))
370 gtk_widget_map (child->widget);
371 }
372}
373
034be888 374#if (GTK_MINOR_VERSION == 0)
c801d85f
KB
375static void
376gtk_myfixed_unmap (GtkWidget *widget)
377{
378 g_return_if_fail (widget != NULL);
379 g_return_if_fail (GTK_IS_MYFIXED (widget));
380
381 GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
382}
38c7b3d3 383#endif
c801d85f
KB
384
385static void
386gtk_myfixed_realize (GtkWidget *widget)
387{
d4c99d6f 388 GtkMyFixed *myfixed;
c801d85f
KB
389 GdkWindowAttr attributes;
390 gint attributes_mask;
391
392 g_return_if_fail (widget != NULL);
393 g_return_if_fail (GTK_IS_MYFIXED (widget));
394
d4c99d6f
RR
395 myfixed = GTK_MYFIXED (widget);
396
c801d85f
KB
397 GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
398
399 attributes.window_type = GDK_WINDOW_CHILD;
034be888
RR
400
401#if (GTK_MINOR_VERSION > 0)
58dea4b0
RR
402 attributes.x = widget->allocation.x;
403 attributes.y = widget->allocation.y;
404 attributes.width = widget->allocation.width;
405 attributes.height = widget->allocation.height;
406
034be888 407 if (myfixed->shadow_type != GTK_SHADOW_NONE)
58dea4b0
RR
408 {
409 attributes.x += 2;
410 attributes.y += 2;
411 attributes.width -= 4;
412 attributes.height -= 4;
413 }
414
415 if (attributes.width < 2) attributes.width = 2;
416 if (attributes.height < 2) attributes.height = 2;
034be888 417#else
11026f7b
RR
418 attributes.x = widget->allocation.x;
419 attributes.y = widget->allocation.y;
c801d85f
KB
420 attributes.width = 32000;
421 attributes.height = 32000;
034be888 422#endif
c801d85f
KB
423 attributes.wclass = GDK_INPUT_OUTPUT;
424 attributes.visual = gtk_widget_get_visual (widget);
425 attributes.colormap = gtk_widget_get_colormap (widget);
426 attributes.event_mask = gtk_widget_get_events (widget);
427 attributes.event_mask |=
428 GDK_EXPOSURE_MASK |
429 GDK_POINTER_MOTION_MASK |
aae24d21 430 GDK_POINTER_MOTION_HINT_MASK |
c801d85f
KB
431 GDK_BUTTON_MOTION_MASK |
432 GDK_BUTTON1_MOTION_MASK |
433 GDK_BUTTON2_MOTION_MASK |
434 GDK_BUTTON3_MOTION_MASK |
435 GDK_BUTTON_PRESS_MASK |
436 GDK_BUTTON_RELEASE_MASK |
437 GDK_KEY_PRESS_MASK |
438 GDK_KEY_RELEASE_MASK |
439 GDK_ENTER_NOTIFY_MASK |
440 GDK_LEAVE_NOTIFY_MASK |
441 GDK_FOCUS_CHANGE_MASK;
442
443 attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
444
445 widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes,
446 attributes_mask);
447 gdk_window_set_user_data (widget->window, widget);
448
449 widget->style = gtk_style_attach (widget->style, widget->window);
450 gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
451}
452
453static void
454gtk_myfixed_size_request (GtkWidget *widget,
455 GtkRequisition *requisition)
456{
457 GtkMyFixed *myfixed;
458 GtkMyFixedChild *child;
459 GList *children;
460
461 g_return_if_fail (widget != NULL);
462 g_return_if_fail (GTK_IS_MYFIXED (widget));
463 g_return_if_fail (requisition != NULL);
464
465 myfixed = GTK_MYFIXED (widget);
466
58d1c1ae
RR
467 /* request very little, I'm not sure if requesting nothing
468 will always have positive effects on stability... */
469 requisition->width = 2;
470 requisition->height = 2;
c801d85f
KB
471
472 children = myfixed->children;
473 while (children)
474 {
475 child = children->data;
476 children = children->next;
477
478 if (GTK_WIDGET_VISIBLE (child->widget))
479 {
480 gtk_widget_size_request (child->widget, &child->widget->requisition);
481 }
482 }
483}
484
485static void
486gtk_myfixed_size_allocate (GtkWidget *widget,
fdd3ed7a 487 GtkAllocation *allocation)
c801d85f
KB
488{
489 GtkMyFixed *myfixed;
034be888 490 gint border;
c801d85f 491 GtkMyFixedChild *child;
034be888
RR
492 GtkAllocation child_allocation;
493 GList *children;
c801d85f
KB
494
495 g_return_if_fail (widget != NULL);
496 g_return_if_fail (GTK_IS_MYFIXED(widget));
497 g_return_if_fail (allocation != NULL);
498
499 myfixed = GTK_MYFIXED (widget);
e208b369 500
227e5e99 501 widget->allocation = *allocation;
a0fdacee 502#if (GTK_MINOR_VERSION > 0)
034be888
RR
503 if (myfixed->shadow_type == GTK_SHADOW_NONE)
504 border = 0;
505 else
506 border = 2;
ef47f9b3
RR
507#else
508 border = 0;
509#endif
034be888 510
c801d85f 511 if (GTK_WIDGET_REALIZED (widget))
034be888
RR
512 {
513 gdk_window_move_resize( widget->window,
514 allocation->x+border, allocation->y+border,
515#if (GTK_MINOR_VERSION > 0)
a0fdacee 516 allocation->width-border*2, allocation->height-border*2
034be888 517#else
a0fdacee 518 32000, 32000
034be888 519#endif
a0fdacee 520 );
034be888 521 }
c801d85f 522
c801d85f
KB
523 children = myfixed->children;
524 while (children)
525 {
526 child = children->data;
527 children = children->next;
69cdfbf7
RR
528
529 /* please look at the text in wxWindow::DoSetSize() on why the
530 test GTK_WIDGET_REALIZED() has to be here */
bbf7db28
RR
531 if (GTK_WIDGET_VISIBLE (child->widget) &&
532 !(!GTK_WIDGET_REALIZED(child->widget) &&
533 GTK_IS_NOTEBOOK(child->widget) ))
c801d85f 534 {
034be888
RR
535 child_allocation.x = child->x;
536 child_allocation.y = child->y;
fdd3ed7a
RR
537 child_allocation.width = child->width;
538 child_allocation.height = child->height;
c801d85f
KB
539 gtk_widget_size_allocate (child->widget, &child_allocation);
540 }
541 }
542}
543
544static void
545gtk_myfixed_paint (GtkWidget *widget,
fdd3ed7a 546 GdkRectangle *area)
c801d85f
KB
547{
548 g_return_if_fail (widget != NULL);
549 g_return_if_fail (GTK_IS_MYFIXED (widget));
550 g_return_if_fail (area != NULL);
551
552 if (GTK_WIDGET_DRAWABLE (widget))
553 gdk_window_clear_area (widget->window,
554 area->x, area->y,
555 area->width, area->height);
556}
557
558static void
559gtk_myfixed_draw (GtkWidget *widget,
fdd3ed7a 560 GdkRectangle *area)
c801d85f
KB
561{
562 GtkMyFixed *myfixed;
563 GtkMyFixedChild *child;
564 GdkRectangle child_area;
565 GList *children;
566
567 g_return_if_fail (widget != NULL);
568 g_return_if_fail (GTK_IS_MYFIXED (widget));
569
570 if (GTK_WIDGET_DRAWABLE (widget))
571 {
572 myfixed = GTK_MYFIXED (widget);
573 gtk_myfixed_paint (widget, area);
574
575 children = myfixed->children;
576 while (children)
577 {
578 child = children->data;
579 children = children->next;
580
581 if (gtk_widget_intersect (child->widget, area, &child_area))
582 gtk_widget_draw (child->widget, &child_area);
583 }
584 }
585}
586
587static gint
588gtk_myfixed_expose (GtkWidget *widget,
fdd3ed7a 589 GdkEventExpose *event)
c801d85f
KB
590{
591 GtkMyFixed *myfixed;
592 GtkMyFixedChild *child;
593 GdkEventExpose child_event;
594 GList *children;
595
596 g_return_val_if_fail (widget != NULL, FALSE);
597 g_return_val_if_fail (GTK_IS_MYFIXED (widget), FALSE);
598 g_return_val_if_fail (event != NULL, FALSE);
599
600 if (GTK_WIDGET_DRAWABLE (widget))
601 {
602 myfixed = GTK_MYFIXED (widget);
603
604 child_event = *event;
605
606 children = myfixed->children;
607 while (children)
608 {
609 child = children->data;
610 children = children->next;
611
612 if (GTK_WIDGET_NO_WINDOW (child->widget) &&
613 gtk_widget_intersect (child->widget, &event->area,
614 &child_event.area))
615 gtk_widget_event (child->widget, (GdkEvent*) &child_event);
616 }
617 }
618
619 return FALSE;
620}
621
622static void
623gtk_myfixed_add (GtkContainer *container,
624 GtkWidget *widget)
625{
626 g_return_if_fail (container != NULL);
627 g_return_if_fail (GTK_IS_MYFIXED (container));
628 g_return_if_fail (widget != NULL);
629
fdd3ed7a 630 gtk_myfixed_put (GTK_MYFIXED (container), widget, 0, 0, 20, 20 );
c801d85f
KB
631}
632
633static void
634gtk_myfixed_remove (GtkContainer *container,
635 GtkWidget *widget)
636{
637 GtkMyFixed *myfixed;
638 GtkMyFixedChild *child;
639 GList *children;
640
641 g_return_if_fail (container != NULL);
642 g_return_if_fail (GTK_IS_MYFIXED (container));
643 g_return_if_fail (widget != NULL);
644
645 myfixed = GTK_MYFIXED (container);
646
647 children = myfixed->children;
648 while (children)
649 {
650 child = children->data;
651
652 if (child->widget == widget)
653 {
654 gtk_widget_unparent (widget);
655
656 myfixed->children = g_list_remove_link (myfixed->children, children);
657 g_list_free (children);
658 g_free (child);
659
660 if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
661 gtk_widget_queue_resize (GTK_WIDGET (container));
662
663 break;
664 }
665
666 children = children->next;
667 }
668}
669
670static void
671gtk_myfixed_foreach (GtkContainer *container,
d345e841 672#if (GTK_MINOR_VERSION > 0)
75ed1d15
GL
673 gboolean include_internals,
674#endif
c801d85f
KB
675 GtkCallback callback,
676 gpointer callback_data)
677{
678 GtkMyFixed *myfixed;
679 GtkMyFixedChild *child;
680 GList *children;
681
682 g_return_if_fail (container != NULL);
683 g_return_if_fail (GTK_IS_MYFIXED (container));
684 g_return_if_fail (callback != NULL);
685
686 myfixed = GTK_MYFIXED (container);
687
688 children = myfixed->children;
689 while (children)
690 {
691 child = children->data;
692 children = children->next;
693
694 (* callback) (child->widget, callback_data);
695 }
696}
697
698
699#ifdef __cplusplus
700}
701#endif /* __cplusplus */
702