Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
mozcontainer.h File Reference
#include <gtk/gtkcontainer.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _MozContainer
struct  _MozContainerClass

Defines

#define MOZ_CONTAINER_TYPE   (moz_container_get_type())
#define MOZ_CONTAINER(obj)   (GTK_CHECK_CAST ((obj), MOZ_CONTAINER_TYPE, MozContainer))
#define MOZ_CONTAINER_CLASS(klass)   (GTK_CHECK_CLASS_CAST ((klass), MOZ_CONTAINER_TYPE, MozContainerClass))
#define IS_MOZ_CONTAINER(obj)   (GTK_CHECK_TYPE ((obj), MOZ_CONTAINER_TYPE))
#define IS_MOZ_CONTAINER_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), MOZ_CONTAINER_TYPE))
#define MOZ_CONAINTER_GET_CLASS(obj)   (GTK_CHECK_GET_CLASS ((obj), MOZ_CONTAINER_TYPE, MozContainerClass))

Typedefs

typedef struct _MozContainer
typedef struct _MozContainerClass

Functions

GtkType moz_container_get_type (void)
GtkWidget * moz_container_new (void)
void moz_container_put (MozContainer *container, GtkWidget *child_widget, gint x, gint y)
void moz_container_move (MozContainer *container, GtkWidget *child_widget, gint x, gint y, gint width, gint height)
void moz_container_scroll_update (MozContainer *container, GtkWidget *child_widget, gint x, gint y)

Class Documentation

struct _MozContainer

Definition at line 58 of file mozcontainer.h.

Class Members
GList * children
GtkContainer container
struct _MozContainerClass

Definition at line 64 of file mozcontainer.h.

Class Members
GtkContainerClass parent_class

Define Documentation

#define IS_MOZ_CONTAINER (   obj)    (GTK_CHECK_TYPE ((obj), MOZ_CONTAINER_TYPE))

Definition at line 51 of file mozcontainer.h.

#define IS_MOZ_CONTAINER_CLASS (   klass)    (GTK_CHECK_CLASS_TYPE ((klass), MOZ_CONTAINER_TYPE))

Definition at line 52 of file mozcontainer.h.

#define MOZ_CONAINTER_GET_CLASS (   obj)    (GTK_CHECK_GET_CLASS ((obj), MOZ_CONTAINER_TYPE, MozContainerClass))

Definition at line 53 of file mozcontainer.h.

#define MOZ_CONTAINER (   obj)    (GTK_CHECK_CAST ((obj), MOZ_CONTAINER_TYPE, MozContainer))

Definition at line 49 of file mozcontainer.h.

#define MOZ_CONTAINER_CLASS (   klass)    (GTK_CHECK_CLASS_CAST ((klass), MOZ_CONTAINER_TYPE, MozContainerClass))

Definition at line 50 of file mozcontainer.h.

Definition at line 48 of file mozcontainer.h.


Typedef Documentation

typedef struct _MozContainer

Definition at line 55 of file mozcontainer.h.

typedef struct _MozContainerClass

Definition at line 56 of file mozcontainer.h.


Function Documentation

Definition at line 82 of file mozcontainer.c.

{
    static GtkType moz_container_type = 0;

    if (!moz_container_type) {
        static GTypeInfo moz_container_info = {
            sizeof(MozContainerClass), /* class_size */
            NULL, /* base_init */
            NULL, /* base_finalize */
            (GClassInitFunc) moz_container_class_init, /* class_init */
            NULL, /* class_destroy */
            NULL, /* class_data */
            sizeof(MozContainer), /* instance_size */
            0, /* n_preallocs */
            (GInstanceInitFunc) moz_container_init, /* instance_init */
            NULL, /* value_table */
        };

        moz_container_type = g_type_register_static (GTK_TYPE_CONTAINER,
                                                     "MozContainer",
                                                     &moz_container_info, 0);
    }

    return moz_container_type;
}

Here is the call graph for this function:

void moz_container_move ( MozContainer *  container,
GtkWidget *  child_widget,
gint  x,
gint  y,
gint  width,
gint  height 
)

Definition at line 141 of file mozcontainer.c.

{
    MozContainerChild *child;
    GtkAllocation new_allocation;

    child = moz_container_get_child (container, child_widget);

    child->x = x;
    child->y = y;

    new_allocation.x = x;
    new_allocation.y = y;
    new_allocation.width = width;
    new_allocation.height = height;

    /* printf("moz_container_move %p %p will allocate to %d %d %d %d\n",
       (void *)container, (void *)child_widget,
       new_allocation.x, new_allocation.y,
       new_allocation.width, new_allocation.height); */

    gtk_widget_size_allocate(child_widget, &new_allocation);
}

Here is the call graph for this function:

GtkWidget* moz_container_new ( void  )

Definition at line 109 of file mozcontainer.c.

{
    MozContainer *container;

    container = gtk_type_new (MOZ_CONTAINER_TYPE);

    return GTK_WIDGET(container);
}

Here is the caller graph for this function:

void moz_container_put ( MozContainer *  container,
GtkWidget *  child_widget,
gint  x,
gint  y 
)

Definition at line 119 of file mozcontainer.c.

{
    MozContainerChild *child;

    child = g_new (MozContainerChild, 1);

    child->widget = child_widget;
    child->x = x;
    child->y = y;

    /*  printf("moz_container_put %p %p %d %d\n", (void *)container,
        (void *)child_widget, x, y); */

    container->children = g_list_append (container->children, child);

    /* we assume that the caller of this function will have already set
       the parent GdkWindow because we can have many anonymous children. */
    gtk_widget_set_parent(child_widget, GTK_WIDGET(container));
}

Here is the caller graph for this function:

void moz_container_scroll_update ( MozContainer *  container,
GtkWidget *  child_widget,
gint  x,
gint  y 
)

Definition at line 171 of file mozcontainer.c.

{
    MozContainerChild *child;
    GtkAllocation new_allocation;

    child = moz_container_get_child (container, child_widget);

    child->x = x;
    child->y = y;

    new_allocation.x = x;
    new_allocation.y = y;
    new_allocation.width = child_widget->allocation.width;
    new_allocation.height = child_widget->allocation.height;

    /* printf("moz_container_update %p %p will allocate to %d %d %d %d\n",
       (void *)container, (void *)child_widget,
       new_allocation.x, new_allocation.y,
       new_allocation.width, new_allocation.height); */

    gtk_widget_size_allocate(child_widget, &new_allocation);
}

Here is the call graph for this function: