libgeda

geda_list.c File Reference

list derived from GList with GObject properties More...

#include <config.h>
#include <glib-object.h>
#include "geda_list.h"
Include dependency graph for geda_list.c:

Go to the source code of this file.

Enumerations

enum  { CHANGED, LAST_SIGNAL }

Functions

static void geda_list_instance_init (GTypeInstance *instance, gpointer g_class)
 GType instance initialiser for GedaList.
static void geda_list_finalize (GObject *object)
 GObject finalise handler.
static void geda_list_class_init (gpointer g_class, gpointer g_class_data)
 GType class initialiser for GedaList.
GType geda_list_get_type (void)
 Function to retrieve GedaList's GType identifier.
GedaListgeda_list_new (void)
 Returns a pointer to a new GedaList object.
void geda_list_add (GedaList *list, gpointer item)
 Adds the given item to the GedaList.
void geda_list_add_glist (GedaList *list, GList *items)
 Adds the given glist of items to the GedaList.
void geda_list_remove (GedaList *list, gpointer item)
 Removes the given item from the GedaList.
void geda_list_remove_all (GedaList *list)
 Removes all the items in the given GedaList.

Variables

static guint geda_list_signals [LAST_SIGNAL] = { 0 }
static GObjectClass * geda_list_parent_class = NULL

Detailed Description

This GedaList with the GObject properties can use the signaling mechanisms of GObject now.

Definition in file geda_list.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
CHANGED 
LAST_SIGNAL 

Definition at line 39 of file geda_list.c.


Function Documentation

static void geda_list_instance_init ( GTypeInstance *  instance,
gpointer  g_class 
) [static]
Function Description
GType instance initialiser for GedaList.
Parameters:
[in]instanceThe GedaList we are initialising.
[in]g_classThe class of the type the instance is created for.

Definition at line 56 of file geda_list.c.

static void geda_list_finalize ( GObject *  object) [static]
Function Description
Just before the GedaList GObject is finalized, free our allocated data, and then chain up to the parent's finalize handler.
Parameters:
[in]objectThe GObject being finalized.

Definition at line 73 of file geda_list.c.

static void geda_list_class_init ( gpointer  g_class,
gpointer  g_class_data 
) [static]
Function Description
GType class initialiser for GedaList. We override our parents virtual class methods as needed and register our GObject signals.
Parameters:
[in]g_classThe GedaList we are initialising
[in]g_class_data(unused)

Definition at line 91 of file geda_list.c.

Here is the call graph for this function:

GType geda_list_get_type ( void  )
Function Description
Function to retrieve GedaList's GType identifier. Upon first call, this registers the GedaList in the GType system. Subsequently it returns the saved value from its first execution.
Returns:
the GType identifier associated with GedaList.

Definition at line 122 of file geda_list.c.

Here is the call graph for this function:

GedaList* geda_list_new ( void  )
Function Description
Returns a pointer to a new GedaList object.
Returns:
pointer to the new GedaList object.

Definition at line 150 of file geda_list.c.

void geda_list_add ( GedaList list,
gpointer  item 
)
Function Description
Adds the given item to the GedaList
Parameters:
[in]listPointer to the GedaList
[in]itemitem to add to the GedaList.

Definition at line 163 of file geda_list.c.

void geda_list_add_glist ( GedaList list,
GList *  items 
)
Function Description
Adds the given glist of items to the GedaList A copy is made, so the original GList is not modified.
Parameters:
[in]listPointer to the GedaList
[in]itemsGList of items to add to the GedaList.

Definition at line 179 of file geda_list.c.

void geda_list_remove ( GedaList list,
gpointer  item 
)
Function Description
Removes the given item from the GedaList. It's ok to call this function with an item which is not necessarily in the list.
Parameters:
[in]listPointer to the GedaList
[in]itemto remove from the GedaList.

Definition at line 197 of file geda_list.c.

void geda_list_remove_all ( GedaList list)
Function Description
Removes all items in the given GedaList.
Parameters:
[in]listPointer to the GedaList

Definition at line 214 of file geda_list.c.


Variable Documentation

guint geda_list_signals[LAST_SIGNAL] = { 0 } [static]

Definition at line 44 of file geda_list.c.

GObjectClass* geda_list_parent_class = NULL [static]

Definition at line 45 of file geda_list.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines