home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / extensions / lib / PEX / include / phgargs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-12  |  11.5 KB  |  512 lines

  1. /* $XConsortium: phgargs.h,v 5.3 91/07/12 20:21:55 hersh Exp $ */
  2.  
  3. /***********************************************************
  4. Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
  5.  
  6.                         All Rights Reserved
  7.  
  8. Permission to use, copy, modify, and distribute this software and its 
  9. documentation for any purpose and without fee is hereby granted, 
  10. provided that the above copyright notice appear in all copies and that
  11. both that copyright notice and this permission notice appear in 
  12. supporting documentation, and that the names of Sun Microsystems,
  13. the X Consortium, and MIT not be used in advertising or publicity 
  14. pertaining to distribution of the software without specific, written 
  15. prior permission.  
  16.  
  17. SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
  18. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
  19. SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  20. DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23. SOFTWARE.
  24. ******************************************************************/
  25.  
  26. #ifndef PHGARGS_H_INCLUDED
  27. #define PHGARGS_H_INCLUDED
  28.  
  29. /* Argument typedefs for the CP functions */
  30.  
  31. typedef struct {
  32.     XID        drawable_id;
  33.     Display    *display;
  34.     char    *display_name;
  35.     int        display_name_length;
  36. } Phg_args_conn_info;
  37.  
  38. typedef struct {
  39.     Pint        wsid;
  40.     XID            wsrid;
  41.     Phg_args_conn_info    conn_info;
  42.     Cpx_css_srvr_type    css_srvr_type;
  43.     Wst            *type;
  44.     char        *wst_display_name;
  45.     int            wst_display_name_length;
  46.     char        *wst_buffer;
  47.     int            wst_buffer_size;
  48.     long        dpy_resource_base;    /* type A only, CP assigned*/
  49.     int            dpy_resource_shift;    /* type A only, CP assigned*/
  50. } Phg_args_open_ws;
  51.  
  52. typedef struct {
  53.     Pint    wsid;
  54.     Pctrl_flag    flag;
  55. } Phg_args_ws_redraw_all;
  56.  
  57. typedef struct {
  58.     Pint    wsid;
  59.     Pregen_flag    flag;
  60. } Phg_args_ws_update;
  61.  
  62. typedef struct {
  63.     Pint    wsid;
  64.     Pdefer_mode    mode;
  65.     Pmod_mode    mod_mode;
  66. } Phg_args_set_disp_state;
  67.  
  68. typedef struct {
  69.     Pint    wsid;
  70.     char    *msg;
  71.     Pint    msg_length;
  72. } Phg_args_message;
  73.  
  74. typedef enum {
  75.     PHG_ARGS_LNREP,
  76.     PHG_ARGS_EXTLNREP,
  77.     PHG_ARGS_MKREP,
  78.     PHG_ARGS_EXTMKREP,
  79.     PHG_ARGS_TXREP,
  80.     PHG_ARGS_EXTTXREP,
  81.     PHG_ARGS_EFREP,
  82.     PHG_ARGS_INTERREP,
  83.     PHG_ARGS_EXTINTERREP,
  84.     PHG_ARGS_EDGEREP,
  85.     PHG_ARGS_EXTEDGEREP,
  86.     PHG_ARGS_PTREP,
  87.     PHG_ARGS_EXTPTREP,
  88.     PHG_ARGS_COREP, 
  89.     PHG_ARGS_VIEWREP,
  90.     PHG_ARGS_DCUEREP,
  91.     PHG_ARGS_LIGHTSRCREP,
  92.     PHG_ARGS_COLRMAPREP
  93. } Phg_args_rep_type;
  94.  
  95. typedef struct {
  96.     Pint        index;
  97.     union {
  98.         Pline_bundle        lnrep;
  99.         Pline_bundle_plus    extlnrep;
  100.         Pmarker_bundle        mkrep;
  101.         Pmarker_bundle_plus    extmkrep;
  102.         Ptext_bundle        txrep;
  103.         Ptext_bundle_plus    exttxrep;
  104.         Pint_bundle        interrep;
  105.         Pint_bundle_plus    extinterrep;
  106.         Pedge_bundle        edgerep;
  107.         Pedge_bundle_plus    extedgerep;
  108.         Ppat_rep        ptrep;
  109.         Ppat_rep_plus        extptrep;
  110.         Pcolr_rep        corep;
  111.         Pview_rep3          viewrep;
  112.     Plight_src_bundle    lightsrcrep;
  113.     Pdcue_bundle          dcuerep;
  114.     Phg_colr_map_rep    colrmaprep;
  115.     }            bundl;
  116. } Phg_args_rep_data;
  117.  
  118. typedef struct {
  119.     Pint        wsid;
  120.     Phg_args_rep_type    type;
  121.     Phg_args_rep_data    rep;
  122. } Phg_args_set_rep;
  123.  
  124. typedef enum {
  125.     PHG_ARGS_FLT_HIGH,
  126.     PHG_ARGS_FLT_INVIS,
  127.     PHG_ARGS_FLT_DRAWABLE_PICK,
  128.     PHG_ARGS_FLT_PICK
  129. } Phg_args_flt_type;
  130.  
  131. typedef struct {
  132.     Pint        wsid;
  133.     Pint        devid;    /* pick filter only */
  134.     Phg_args_flt_type    type;
  135.     Pint_list        inc_set;
  136.     Pint_list        exc_set;
  137. } Phg_args_set_filter;
  138.  
  139. typedef struct {
  140.     Pint    wsid;
  141.     Pint    model;
  142. } Phg_args_set_colour_model;
  143.  
  144. typedef struct {
  145.     Pint    wsid;
  146.     Pint    mode;
  147. } Phg_args_set_hlhsr_mode;
  148.  
  149. typedef struct {
  150.     Pint    wsid;
  151.     Pint    idx;
  152.     Pint    ref_idx;
  153.     Prel_pri    priority;
  154. } Phg_args_set_view_input_prio;
  155.  
  156. typedef struct {
  157.     Pint    wsid;
  158.     Pint    two_d;    /* ~0 if two dimensional version */
  159.     Plimit3    limits;
  160. } Phg_args_set_ws_winvp;
  161.  
  162. typedef enum {
  163.     PHG_ARGS_SETEP_ABS,
  164.     PHG_ARGS_SETEP_REL,
  165.     PHG_ARGS_SETEP_LABEL,
  166.     PHG_ARGS_SETEP_PICK_ID
  167. } Phg_args_set_ep_op;
  168.  
  169. typedef struct {
  170.     Phg_args_set_ep_op    op;
  171.     Pint        data;
  172. } Phg_args_set_el_ptr;
  173.  
  174. typedef enum {
  175.     PHG_ARGS_DEL_CURRENT,
  176.     PHG_ARGS_DEL_RANGE,
  177.     PHG_ARGS_DEL_LABEL,
  178.     PHG_ARGS_EMPTY_STRUCT
  179. } Phg_args_del_el_op;
  180.  
  181. typedef union {
  182.     struct {
  183.         Pint    ep1;
  184.         Pint    ep2;
  185.     } ep_values;
  186.     struct {
  187.         Pint    label1;
  188.         Pint    label2;
  189.     } label_range;
  190.     Pint    struct_id;
  191. } Phg_args_del_el_data;
  192.  
  193. typedef struct {
  194.     Phg_args_del_el_op        op;
  195.     Phg_args_del_el_data    data;
  196. } Phg_args_del_el;
  197.  
  198. typedef struct {
  199.     Pint    id;
  200.     Pref_flag    flag;
  201. } Phg_args_del_struct_net;
  202.  
  203. typedef struct {
  204.     Pint    orig_id;
  205.     Pint    new_id;
  206.     int        posted;    /* assigned by CP, not the binding */
  207. } Phg_args_change_struct;
  208.  
  209. typedef struct {
  210.     Pint    wsid;
  211.     Pint    struct_id;
  212.     Pfloat    disp_pri;
  213. } Phg_args_post_struct;
  214.  
  215. typedef struct {
  216.     Pint    wsid;
  217.     Pint    struct_id;
  218. } Phg_args_unpost_struct;
  219.  
  220. typedef struct {
  221.     char    *fname;
  222.     Pint    name_length;
  223.     Pint    arid;
  224. } Phg_args_ar_open;
  225.  
  226. typedef enum {
  227.     PHG_ARGS_AR_STRUCTS,
  228.     PHG_ARGS_AR_NETWORKS,
  229.     PHG_ARGS_AR_ALL
  230. } Phg_args_ar_op;
  231.  
  232. typedef struct {
  233.     Pint        arid;
  234.     Phg_args_ar_op    op;
  235.     Pint_list        data;
  236.     Pconf_res        resflag;
  237. } Phg_args_ar_info;
  238.  
  239. typedef enum {
  240.     PHG_ARGS_INP_LOC3,
  241.     PHG_ARGS_INP_LOC,
  242.     PHG_ARGS_INP_STK3,
  243.     PHG_ARGS_INP_STK,
  244.     PHG_ARGS_INP_VAL3,
  245.     PHG_ARGS_INP_VAL,
  246.     PHG_ARGS_INP_CHC3,
  247.     PHG_ARGS_INP_CHC,
  248.     PHG_ARGS_INP_PIK3,
  249.     PHG_ARGS_INP_PIK,
  250.     PHG_ARGS_INP_STR3,
  251.     PHG_ARGS_INP_STR
  252. } Phg_args_idev_class;
  253.  
  254. typedef union {
  255.         struct {
  256.             Ploc3    init;
  257.             Ploc_data3    rec;
  258.         } loc;
  259.         struct {
  260.             Pstroke3        init;
  261.             Pstroke_data3    rec;
  262.         } stk;
  263.         struct {
  264.             Pfloat    init;
  265.         int        counts[4];    /* lengths of label strings */
  266.             Pval_data    rec;
  267.         } val;
  268.         struct {
  269.             Pin_status    status;
  270.             Pint        init;
  271.         int            string_list_size;
  272.             Pchoice_data    rec;
  273.         } cho;
  274.         struct {
  275.             Ppick    init;
  276.             Ppick_data    rec;
  277.             Ppath_order    porder;
  278.         } pik;
  279.         struct {
  280.         Phg_string    init;
  281.             Pstring_data    rec;
  282.         } str;
  283. } Phg_args_init_data;
  284.  
  285. typedef struct {
  286.     Pint        wsid;
  287.     Phg_args_idev_class    class;
  288.     Pint        dev;
  289.     Pint        pet;
  290.     Plimit3        echo_volume;
  291.     Phg_args_init_data    data;
  292. } Phg_args_inp_init_dev;
  293.  
  294. typedef struct {
  295.     Phg_args_idev_class    class;
  296.     Pint        dev;
  297.     Pop_mode        mode;
  298.     Pecho_switch    echo;
  299. } Phg_args_set_mode_data;
  300.  
  301. typedef struct {
  302.     Pint            wsid;
  303.     Phg_args_set_mode_data    data;
  304. } Phg_args_inp_set_mode;
  305.  
  306. typedef struct {
  307.     Pint        wsid;
  308.     Phg_args_idev_class    class;
  309.     Pint        dev;
  310. } Phg_args_inp_request;
  311.  
  312. typedef struct {
  313.     Pint        wsid;
  314.     Phg_args_idev_class    class;
  315.     Pint        dev;
  316. } Phg_args_inp_sample;
  317.  
  318. typedef struct {
  319.     Pint    wsid;
  320.     Pin_class    class;
  321.     Pint    dev;
  322. } Phg_args_inp_flush;
  323.  
  324. typedef struct {
  325.     Pint        wsid;
  326.     Phg_args_idev_class    class;
  327.     Pint        dev;
  328.     Pinq_type        inq_type; /* locator, stroke and pick only */
  329. } Phg_args_q_inp_state;
  330.  
  331. typedef struct {
  332.     Pint    struct_id;
  333.     Pint    el_id;        /* el_id < 0 means current element */
  334. } Phg_args_q_el_data;
  335.  
  336. typedef enum {
  337.     PHG_ARGS_HIER_ANCESTORS,
  338.     PHG_ARGS_HIER_DESCENDANTS
  339. } Phg_args_hierarchy_dir;
  340.  
  341. typedef struct {
  342.     Phg_args_hierarchy_dir    dir;
  343.     Pint            struct_id;
  344.     Ppath_order            order;
  345.     Pint            depth;
  346. } Phg_args_q_hierarchy;        /* ancestors and descendants */
  347.  
  348. typedef struct {
  349.     Pint            arid;
  350.     Phg_args_q_hierarchy    hier;
  351. } Phg_args_q_ar_hierarchy;
  352.  
  353. typedef struct {
  354.     XID                wsid;
  355.     Pint            font;
  356.     Pfloat            char_expan;
  357.     Pfloat            spacing;
  358.     Pfloat            height;
  359.     Ptext_path            path;
  360.     Phor_text_align        hor;
  361.     Pvert_text_align        ver;
  362.     char            *str;
  363.     Pint            length;
  364. } Phg_args_q_text_extent;
  365.  
  366. typedef struct {
  367.     Pint        wsid;
  368.     Phg_args_rep_type    type;
  369. } Phg_args_q_indices;
  370.  
  371. typedef enum {
  372.     PHG_ARGS_CONF_ALL,
  373.     PHG_ARGS_CONF_NET
  374. } Phg_args_conf_op;
  375.  
  376. typedef struct {
  377.     Phg_args_conf_op    op;
  378.     Pint        arid;
  379.     Pint        struct_id;
  380.     Pstruct_net_source    src;
  381. } Phg_args_q_conflicting;
  382.  
  383. typedef struct {
  384.     Pint        wsid;
  385.     Pint        index;
  386. } Phg_args_q_view_rep;
  387.  
  388. typedef struct {
  389.     Pint        wsid;
  390.     Pint        index;
  391. } Phg_args_q_view;
  392.  
  393. typedef struct {
  394.     Pint        wsid;
  395.     Pint        index;
  396.     Pinq_type        type;        /* set or realized */
  397.     Phg_args_rep_type    rep_type;
  398. } Phg_args_q_rep;
  399.  
  400. typedef struct {
  401.     Pint        wsid;
  402.     Phg_args_flt_type    type;
  403. } Phg_args_q_filter;
  404.  
  405. typedef struct {
  406.     Pint        struct_id;
  407.     Pint        start_el;
  408.     Psearch_dir        dir;
  409.     Pelem_type_list    incl;
  410.     Pelem_type_list    excl;
  411. } Phg_args_el_search;
  412.  
  413. typedef struct {
  414.     Ppoint3        ref_pt;
  415.     Pfloat        distance;
  416.     Pint        ceiling;
  417.     Pclip_ind        mclip_flag;
  418.     Pelem_ref_list    start_path;
  419.     Pfilter        nrm_filt;
  420.     Pfilter        inv_filt;
  421. } Phg_args_inc_spa_search;
  422.  
  423. typedef struct {
  424.     Pelem_type        el_type;
  425.     Phg_pex_oc        pex_oc;
  426. } Phg_args_add_el;
  427.  
  428. typedef struct {
  429.     Pint        wsid;
  430.     Ppoint        point;
  431.     Pfloat        ap_size;
  432.     Ppath_order        order;
  433.     Pint        pet;
  434.     Pecho_switch    esw;
  435.     Plimit3        echo_volume;
  436.     Pfilter        filter;
  437. } Phg_args_drawable_pick; /* drawable point to pick */
  438.  
  439. typedef struct {
  440.     Pint        wsid;
  441.     Ppoint_list3    points;
  442. } Phg_args_map_points;    /* drawable points to WC */
  443.  
  444. typedef struct {
  445.     Pint        wsid;
  446.     Pint        num_regions;
  447.     XRectangle        *regions;
  448. } Phg_args_redraw_regions;
  449.  
  450. typedef struct {
  451.     Pint        wsid;
  452.     Pint        map_method;
  453. } Phg_args_q_colr_map_meth_st;
  454.  
  455. typedef union {
  456.     Pint                idata;
  457.     Pfloat                fdata;
  458.     Phg_args_add_el            add_el;
  459.     Phg_args_ar_info            ar_info;
  460.     Phg_args_ar_open            ar_open;
  461.     Phg_args_change_struct        change_struct;
  462.     Phg_args_del_el            del_el;
  463.     Phg_args_del_struct_net        del_struct_net;
  464.     Phg_args_inp_flush            inp_flush;
  465.     Phg_args_inp_init_dev        inp_init_dev;
  466.     Phg_args_inp_request        inp_request;
  467.     Phg_args_inp_sample            inp_sample;
  468.     Phg_args_inp_set_mode        inp_set_mode;
  469.     Phg_args_message            message;
  470.     Phg_args_post_struct        post_struct;
  471.     Phg_args_set_colour_model        set_colour_model;
  472.     Phg_args_set_disp_state        set_disp_state;
  473.     Phg_args_set_el_ptr            set_el_ptr;
  474.     Phg_args_set_ep_op            set_ep_op;
  475.     Phg_args_set_filter            set_filter;
  476.     Phg_args_set_hlhsr_mode        set_hlhsr_mode;
  477.     Phg_args_set_rep            set_rep;
  478.     Phg_args_set_view_input_prio    set_view_input_prio;
  479.     Phg_args_set_ws_winvp        set_ws_winvp;
  480.     Phg_args_unpost_struct        unpost_struct;
  481.     Phg_args_open_ws            open_ws;
  482.     Phg_args_ws_redraw_all        ws_redraw_all;
  483.     Phg_args_ws_update            ws_update;
  484.     Phg_args_el_search            el_search;
  485.     Phg_args_inc_spa_search        inc_spa_search;
  486.  
  487.     Phg_args_q_el_data            q_el_data;
  488.     Phg_args_q_hierarchy        q_hierarchy;
  489.     Phg_args_q_ar_hierarchy        q_ar_hierarchy;
  490.     Phg_args_q_text_extent        q_text_extent;
  491.     Phg_args_q_indices            q_indices;
  492.     Phg_args_q_conflicting        q_conflicting;
  493.     Phg_args_q_view_rep            q_view_rep;
  494.     Phg_args_q_rep            q_rep;
  495.     Phg_args_q_inp_state        q_inp_state;
  496.     Phg_args_q_filter            q_filter;
  497.     Phg_args_drawable_pick        drawable_pick;
  498.     Phg_args_map_points            map_points;
  499.     Phg_args_redraw_regions        redraw_regions;
  500.     Phg_args_q_colr_map_meth_st        q_colr_map_meth_st;
  501. } Phg_arg_data;
  502.  
  503. typedef struct {
  504.     unsigned        op;
  505.     Pint        funcnum;    /* PHIGS function number */
  506.     Phg_arg_data    data;
  507.     /* Below fields only used in two-process model. */
  508.     unsigned int    data_size;    /* size of pre data */
  509. } Phg_args;
  510.  
  511. #endif
  512.