pcb 4.1.1
An interactive printed circuit board layout editor.
|
HID internal interfaces. More...
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_Action * | hid_find_action (const char *name) |
HID_Flag * | hid_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) |
BoxType * | hid_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_AttrNode * | hid_attr_nodes |
HID internal interfaces.
These may ONLY be called from the HID modules, not from the common PCB code.
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.
Definition at line 39 of file hidint.h.
Referenced by eps_set_layer(), ghid_set_layer(), lesstif_set_layer(), and png_set_layer().
Definition at line 38 of file hidint.h.
Referenced by ps_set_layer().
Definition at line 37 of file hidint.h.
Referenced by eps_set_layer(), extents_set_layer(), gcode_choose_groups(), gcode_set_layer(), gerber_set_layer(), ghid_set_layer(), gsvit_choose_groups(), gsvit_set_layer(), lesstif_set_layer(), nelma_choose_groups(), nelma_set_layer(), png_set_layer(), and ps_set_layer().
typedef struct HID_AttrNode HID_AttrNode |
enum File_Name_Style |
void derive_default_filename | ( | const char * | pcbfile, |
HID_Attribute * | filename_attrib, | ||
const char * | suffix, | ||
char ** | memory | ||
) |
Definition at line 802 of file hidinit.c.
References HID_Attribute::default_val, malloc(), and HID_Attr_Val::str_value.
Referenced by bom_get_export_options(), gcode_get_export_options(), gerber_get_export_options(), gsvit_get_export_options(), IPCD356_get_export_options(), nelma_get_export_options(), png_get_export_options(), ps_get_export_options(), and REGISTER_ATTRIBUTES().
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().
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().
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().
BoxType* hid_get_extents | ( | void * | item | ) |
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.
For example, the Lesstif HID needs to use the Xt parser, but the Postscript HID can use this function.
Definition at line 308 of file hidinit.c.
References HID_AttrNode::attributes, HID_Attr_Val::coord_value, HID_Attribute::default_val, HID_Attribute::enumerations, get_unit_struct(), GetValue(), HID_Boolean, HID_Coord, HID_Enum, HID_Integer, HID_Label, HID_Mixed, HID_Path, HID_Real, HID_String, HID_Unit, unit::index, HID_Attr_Val::int_value, HID_AttrNode::n, HID_Attribute::name, HID_AttrNode::next, ok, HID_Attr_Val::real_value, HID_Attr_Val::str_value, unit::suffix, HID_Attribute::type, unit, and HID_Attribute::value.
Referenced by batch_parse_arguments(), bom_parse_arguments(), eps_parse_arguments(), gcode_parse_arguments(), gerber_parse_arguments(), gsvit_parse_arguments(), IPCD356_parse_arguments(), lpr_parse_arguments(), nelma_parse_arguments(), png_parse_arguments(), and ps_parse_arguments().
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().
void hid_restore_layer_ons | ( | int * | save_array | ) |
Use this to restore them.
Definition at line 140 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().
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 | ( | int | idx, |
int | style | ||
) |
Definition at line 148 of file hid/common/flags.c.
References BOTTOM_SIDE, PCBType::Data, FNS_first, FNS_single, GetLayerGroupNumberByNumber(), GetLayerGroupNumberBySide(), DataType::Layer, PCBType::LayerGroups, LayerType::Name, LayerGroupType::Number, PCB, SL, and TOP_SIDE.
Referenced by gcode_do_export(), gsvit_do_export(), gsvit_write_xnets(), gsvit_write_xspace(), layer_type_to_file_name_ex(), nelma_do_export(), nelma_write_layers(), nelma_write_nets(), nelma_write_object(), and nelma_write_space().
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().
Definition at line 292 of file hidinit.c.
Referenced by ghid_config_init(), hid_register_attributes(), lesstif_parse_arguments(), parse_optionv(), print_defaults(), and usage().
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().
int hid_num_hids |
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().