pcb 4.1.1
An interactive printed circuit board layout editor.

hidint.h File Reference

HID internal interfaces. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HID_AttrNode

Defines

#define SL_TYPE(x)   ((x) < 0 ? (x) & 0x0f0 : 0)
#define SL_SIDE(x)   ((x) & 0x00f)
#define SL_MYSIDE(x)   ((((x) & SL_BOTTOM_SIDE)!=0) == (SWAP_IDENT != 0))

Typedefs

typedef struct HID_AttrNode HID_AttrNode

Enumerations

enum  File_Name_Style { FNS_fixed, FNS_single, FNS_first }

Functions

void hid_register_hid (HID *hid)
 Called by the init funcs, used to set up hid_list.
int hid_cache_color (int set, const char *name, hidval *val, void **cache)
 Used to cache color lookups.
HID_Actionhid_find_action (const char *name)
HID_Flaghid_find_flag (const char *name)
void hid_parse_command_line (int *argc, char ***argv)
 A HID may use this if it does not need command line arguments in any special format.
void hid_save_and_show_layer_ons (int *save_array)
 Use this to temporarily enable all layers, so that they can be exported even if they're not currently visible.
void hid_restore_layer_ons (int *save_array)
 Use this to restore them.
const char * layer_type_to_file_name (int idx, int style)
const char * layer_type_to_file_name_ex (int idx, int style, const char *layer_name)
BoxTypehid_get_extents (void *item)
 Convenience function that calls the expose callback for the item, and returns the extents of what was drawn.
void derive_default_filename (const char *pcbfile, HID_Attribute *filename_attrib, const char *suffix, char **memory)

Variables

HID ** hid_list
 NULL terminated list of all static HID structures.
int hid_num_hids
 Count of entries in the above.
HID_AttrNodehid_attr_nodes

Detailed Description

HID internal interfaces.

These may ONLY be called from the HID modules, not from the common PCB code.


Copyright.


PCB, interactive printed circuit board design

Copyright (C) 2006 DJ Delorie

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Contact addresses for paper mail and Email: Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany Thomas.Nau@rz.uni-ulm.de

Definition in file hidint.h.


Define Documentation

#define SL_MYSIDE (   x)    ((((x) & SL_BOTTOM_SIDE)!=0) == (SWAP_IDENT != 0))

Definition at line 39 of file hidint.h.

Referenced by eps_set_layer(), ghid_set_layer(), lesstif_set_layer(), and png_set_layer().

#define SL_SIDE (   x)    ((x) & 0x00f)

Definition at line 38 of file hidint.h.

Referenced by ps_set_layer().


Typedef Documentation

typedef struct HID_AttrNode HID_AttrNode

Enumeration Type Documentation

Enumerator:
FNS_fixed 

Files for copper layers are named top, groupN, bottom.

FNS_single 

Groups with multiple layers are named as above, else the single layer name is used.

FNS_first 

The name of the first layer in each group is used.

Definition at line 104 of file hidint.h.


Function Documentation

void derive_default_filename ( const char *  pcbfile,
HID_Attribute filename_attrib,
const char *  suffix,
char **  memory 
)
int hid_cache_color ( int  set,
const char *  name,
hidval val,
void **  cache 
)

Used to cache color lookups.

If set is zero, it looks up the name and if found sets val and returns nonzero. If not found, it returns zero. If set is nonzero, name/val is added to the cache.

Definition at line 751 of file hidinit.c.

References ccache::colors, copy_color(), hash(), HASH_SIZE, ccache::lru, malloc(), ecache::name, ecache::next, and ecache::val.

Referenced by eps_set_color(), ghid_set_color(), lesstif_set_color(), png_set_color(), set_gl_color_for_gc(), and use_gc().

Here is the call graph for this function:

HID_Action* hid_find_action ( const char *  name)

Definition at line 87 of file actions.c.

References action, action_search_compar(), all_actions_sorted, n_actions, and sort_actions().

Referenced by hid_actionv().

Here is the call graph for this function:

HID_Flag* hid_find_flag ( const char *  name)

Definition at line 59 of file hid/common/flags.c.

References flag_sort(), HID_FlagNode::flags, malloc(), HID_FlagNode::n, n, n_flags, and HID_FlagNode::next.

Referenced by hid_get_flag().

Here is the call graph for this function:

BoxType* hid_get_extents ( void *  item)

Convenience function that calls the expose callback for the item, and returns the extents of what was drawn.

Definition at line 199 of file extents.c.

void hid_register_hid ( HID hid)

Called by the init funcs, used to set up hid_list.

Definition at line 216 of file hidinit.c.

References hid_num_hids, malloc(), hid_st::name, realloc(), and hid_st::struct_size.

Referenced by hid_batch_init(), hid_bom_init(), hid_eps_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_ipcd356_init(), hid_lesstif_init(), hid_lpr_init(), hid_nelma_init(), hid_png_init(), hid_ps_init(), and REGISTER_FLAGS().

Here is the call graph for this function:

void hid_restore_layer_ons ( int *  save_array)
void hid_save_and_show_layer_ons ( int *  save_array)

Use this to temporarily enable all layers, so that they can be exported even if they're not currently visible.

save_array must be MAX_ALL_LAYER big.

Definition at line 129 of file hid/common/flags.c.

References PCBType::Data, DataType::Layer, max_copper_layer, LayerType::On, PCB, and SILK_LAYER.

Referenced by eps_do_export(), gcode_do_export(), gerber_do_export(), gsvit_do_export(), nelma_do_export(), png_do_export(), and ps_do_export().

const char* layer_type_to_file_name_ex ( int  idx,
int  style,
const char *  layer_name 
)

Definition at line 221 of file hid/common/flags.c.

References layer_type_to_file_name(), and SL.

Referenced by assign_file_suffix(), and ps_set_layer().

Here is the call graph for this function:


Variable Documentation

NULL terminated list of all static HID structures.

Built by hid_register_hid, used by hid_find_*() and hid_enumerate(). The order in this list is the same as the order of hid_register_hid calls.

Definition at line 78 of file hidinit.c.

Referenced by hid_enumerate().

Count of entries in the above.

Definition at line 79 of file hidinit.c.

Referenced by hid_find_exporter(), hid_find_gui(), hid_find_printer(), and hid_register_hid().