gtk/gl: Play with layer translucency
[geda-pcb/pcjc2.git] / src / hid / hidint.h
blob8d7e5c5284b473b0572ffcd7e64a9a325e86d2cf
1 /* HID internal interfaces. These may ONLY be called from the HID
2 modules, not from the common PCB code. */
4 /* These decode the set_layer index. */
5 #define SL_TYPE(x) ((x) < 0 ? (x) & 0x0f0 : 0)
6 #define SL_SIDE(x) ((x) & 0x00f)
7 #define SL_MYSIDE(x) ((((x) & SL_BOTTOM_SIDE)!=0) == (SWAP_IDENT != 0))
9 /* Called by the init funcs, used to set up hid_list. */
10 extern void hid_register_hid (HID * hid);
12 /* NULL terminated list of all static HID structures. Built by
13 hid_register_hid, used by hid_find_*() and hid_enumerate(). The
14 order in this list is the same as the order of hid_register_hid
15 calls. */
16 extern HID **hid_list;
18 /* Count of entries in the above. */
19 extern int hid_num_hids;
21 /* Used to cache color lookups. If set is zero, it looks up the name
22 and if found sets val and returns nonzero. If not found, it
23 returns zero. If set is nonzero, name/val is added to the
24 cache. */
25 int hid_cache_color (int set, const char *name, hidval * val, void **cache);
27 typedef struct HID_AttrNode
29 struct HID_AttrNode *next;
30 HID_Attribute *attributes;
31 int n;
32 } HID_AttrNode;
34 extern HID_AttrNode *hid_attr_nodes;
36 HID_Action *hid_find_action (const char *name);
38 HID_Flag *hid_find_flag (const char *name);
40 /* A HID may use this if it does not need command line arguments in
41 any special format; for example, the Lesstif HID needs to use the
42 Xt parser, but the Postscript HID can use this function. */
43 void hid_parse_command_line (int *argc, char ***argv);
45 /* Use this to temporarily enable all layers, so that they can be
46 exported even if they're not currently visible. save_array must be
47 MAX_LAYER + EXTRA_LAYERS big. */
48 void hid_save_and_show_layer_ons (int *save_array);
49 /* Use this to restore them. */
50 void hid_restore_layer_ons (int *save_array);
52 enum File_Name_Style {
53 /* Files for copper layers are named top, groupN, bottom. */
54 FNS_fixed,
55 /* Groups with multiple layers are named as above, else the single
56 layer name is used. */
57 FNS_single,
58 /* The name of the first layer in each group is used. */
59 FNS_first,
62 /* Returns a filename base that can be used to output the layer. */
63 const char *layer_type_to_file_name (int idx, int style);
65 /* Convenience function that calls the expose callback for the item,
66 and returns the extents of what was drawn. */
67 BoxType *hid_get_extents (void *item);
69 void derive_default_filename(const char *pcbfile, HID_Attribute *filename_attrib, const char *suffix, char **memory);