libgeda

s_toplevel.c File Reference

#include <config.h>
#include <stdio.h>
#include "libgeda_priv.h"
Include dependency graph for s_toplevel.c:

Go to the source code of this file.

Data Structures

struct  NewToplevelHook

Functions

void s_toplevel_append_new_hook (NewToplevelFunc func, void *data)
static void call_new_toplevel_hook (gpointer hook, gpointer toplevel)
TOPLEVELs_toplevel_new (void)
 Create a TOPLEVEL object.
void s_toplevel_delete (TOPLEVEL *toplevel)
void s_toplevel_weak_ref (TOPLEVEL *toplevel, void(*notify_func)(void *, void *), void *user_data)
 Add a weak reference watcher to an TOPLEVEL.
void s_toplevel_weak_unref (TOPLEVEL *toplevel, void(*notify_func)(void *, void *), void *user_data)
 Remove a weak reference watcher from an TOPLEVEL.
void s_toplevel_add_weak_ptr (TOPLEVEL *toplevel, void *weak_pointer_loc)
 Add a weak pointer to an TOPLEVEL.
void s_toplevel_remove_weak_ptr (TOPLEVEL *toplevel, void *weak_pointer_loc)
 Remove a weak pointer from an TOPLEVEL.

Variables

static GList * new_toplevel_hooks = NULL

Function Documentation

void s_toplevel_append_new_hook ( NewToplevelFunc  func,
void *  data 
)

Definition at line 45 of file s_toplevel.c.

static void call_new_toplevel_hook ( gpointer  hook,
gpointer  toplevel 
) [static]

Definition at line 57 of file s_toplevel.c.

TOPLEVEL* s_toplevel_new ( void  )
Function Description
Create and return an empty TOPLEVEL object with sensible defaults for its properties.
Returns:
the newly created TOPLEVEL.
Todo:
rethink block below that is set in gschem but used in libgeda.

Definition at line 75 of file s_toplevel.c.

Here is the call graph for this function:

void s_toplevel_delete ( TOPLEVEL toplevel)
Todo:
Finish function documentation!!!
Function Description

Definition at line 195 of file s_toplevel.c.

Here is the call graph for this function:

void s_toplevel_weak_ref ( TOPLEVEL toplevel,
void(*)(void *, void *)  notify_func,
void *  user_data 
)
Function Description
Adds the weak reference callback notify_func to toplevel. When toplevel is destroyed, notify_func will be called with two arguments: the toplevel, and the user_data.
See also:
s_toplevel_weak_unref
Parameters:
[in,out]toplevelToplevel to weak-reference.
[in]notify_funcWeak reference notify function.
[in]user_dataData to be passed to notify_func.

Definition at line 246 of file s_toplevel.c.

Here is the call graph for this function:

void s_toplevel_weak_unref ( TOPLEVEL toplevel,
void(*)(void *, void *)  notify_func,
void *  user_data 
)
Function Description
Removes the weak reference callback notify_func from toplevel.
See also:
s_toplevel_weak_ref()
Parameters:
[in,out]toplevelToplevel to weak-reference.
[in]notify_funcNotify function to search for.
[in]user_dataData to to search for.

Definition at line 266 of file s_toplevel.c.

Here is the call graph for this function:

void s_toplevel_add_weak_ptr ( TOPLEVEL toplevel,
void *  weak_pointer_loc 
)
Function Description
Adds the weak pointer at weak_pointer_loc to toplevel. The value of weak_pointer_loc will be set to NULL when toplevel is destroyed.
See also:
s_toplevel_remove_weak_ptr
Parameters:
[in,out]toplevelToplevel to weak-reference.
[in]weak_pointer_locMemory address of a pointer.

Definition at line 287 of file s_toplevel.c.

Here is the call graph for this function:

void s_toplevel_remove_weak_ptr ( TOPLEVEL toplevel,
void *  weak_pointer_loc 
)
Function Description
Removes the weak pointer at weak_pointer_loc from toplevel.
See also:
s_toplevel_add_weak_ptr()
Parameters:
[in,out]toplevelToplevel to weak-reference.
[in]weak_pointer_locMemory address of a pointer.

Definition at line 305 of file s_toplevel.c.

Here is the call graph for this function:


Variable Documentation

GList* new_toplevel_hooks = NULL [static]

Definition at line 37 of file s_toplevel.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines