File: hidint.h

package info (click to toggle)
pcb 20110918-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 22,304 kB
  • sloc: ansic: 121,422; sh: 7,232; yacc: 5,088; pascal: 4,136; makefile: 1,535; perl: 564; lex: 438; awk: 158; lisp: 86; tcl: 63; xml: 20
file content (71 lines) | stat: -rw-r--r-- 2,498 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* $Id$ */

/* HID internal interfaces.  These may ONLY be called from the HID
   modules, not from the common PCB code.  */

/* These decode the set_layer index. */
#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))

/* Called by the init funcs, used to set up hid_list.  */
extern void hid_register_hid (HID * hid);

/* 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.  */
extern HID **hid_list;

/* Count of entries in the above.  */
extern int hid_num_hids;

/* 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.  */
int hid_cache_color (int set, const char *name, hidval * val, void **cache);

typedef struct HID_AttrNode
{
  struct HID_AttrNode *next;
  HID_Attribute *attributes;
  int n;
} HID_AttrNode;

extern HID_AttrNode *hid_attr_nodes;

HID_Action *hid_find_action (const char *name);

HID_Flag *hid_find_flag (const char *name);

/* 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.  */
void hid_parse_command_line (int *argc, char ***argv);

/* 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_LAYER+2 big. */
void hid_save_and_show_layer_ons (int *save_array);
/* Use this to restore them.  */
void hid_restore_layer_ons (int *save_array);

enum File_Name_Style {
  /* Files for copper layers are named top, groupN, bottom.  */
  FNS_fixed,
  /* Groups with multiple layers are named as above, else the single
     layer name is used.  */
  FNS_single,
  /* The name of the first layer in each group is used.  */
  FNS_first,
};

/* Returns a filename base that can be used to output the layer.  */
const char *layer_type_to_file_name (int idx, int style);

/* Convenience function that calls the expose callback for the item,
   and returns the extents of what was drawn.  */
BoxType *hid_get_extents (void *item);

void derive_default_filename(const char *pcbfile, HID_Attribute *filename_attrib, const char *suffix, char **memory);