home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p024 / 12.img / ADS1.LIB / ADSDLG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-11  |  4.6 KB  |  117 lines

  1. /*
  2.    ADSDLG.H  -  Definitions for ADS Programmable Dialogue Boxes
  3.  
  4.       (C) Copyright 1988-1992 by Autodesk, Inc.
  5.  
  6.       This program is copyrighted by Autodesk, Inc. and is  licensed
  7.       to you under the following conditions.  You may not distribute
  8.       or  publish the source code of this program in any form.   You
  9.       may  incorporate this code in object form in derivative  works
  10.       provided  such  derivative  works  are  (i.) are  designed and
  11.       intended  to  work  solely  with  Autodesk, Inc. products, and
  12.       (ii.)  contain  Autodesk's  copyright  notice  "(C)  Copyright
  13.       1988-1992 by Autodesk, Inc."
  14.  
  15.       AUTODESK  PROVIDES THIS PROGRAM "AS IS" AND WITH  ALL  FAULTS.
  16.       AUTODESK  SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF  MER-
  17.       CHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK,  INC.
  18.       DOES  NOT  WARRANT THAT THE OPERATION OF THE PROGRAM  WILL  BE
  19.       UNINTERRUPTED OR ERROR FREE.
  20. */
  21.  
  22.  
  23. /* Defined only for OS/2 DLL Version */
  24. #define CALLB
  25.  
  26. typedef void *ads_hdlg;
  27. typedef void *ads_htile;
  28.  
  29. typedef struct {
  30.     ads_hdlg  dialog;
  31.     ads_htile tile;
  32.     char*     value;
  33.     void*     client_data;
  34.     int       reason;
  35.     long      x, y;
  36. } ads_callback_packet;
  37.  
  38. /* The following are used in tile callback packets. Their meaning
  39.    for each kind of tile can be found in the Programmable Dialogue
  40.    Boxes documentation.
  41. */
  42. #define CBR_SELECT       1
  43. #define CBR_LOST_FOCUS   2
  44. #define CBR_DRAG         3
  45. #define CBR_DOUBLE_CLICK 4
  46.  
  47. /* ADS user's function, passed to AutoCAD to be called later */
  48. typedef void (*CLIENTFUNC) _((ads_callback_packet *cpkt));
  49. #define NULLCB ((CLIENTFUNC)0)
  50.  
  51. #define BAD_DIALOG NULL
  52.  
  53. /* Return by reference integers for ads_start_dialog */
  54. #define DLGCANCEL     0               /* User pressed Cancel or equivalent */
  55. #define DLGOK         1               /* User pressed Ok */
  56. #define DLGALLDONE   -1               /* All dialogs terminated with
  57.                                          term_dialog */
  58. #define DLGSTATUS     2               /* start of user return codes */
  59.  
  60.  
  61. /* List argument type for ads_start_list(); */
  62. #define LIST_CHANGE   ((short) 1)     /* Change selected listbox contents */
  63. #define LIST_APPEND   ((short) 2)     /* Append new listbox entry */
  64. #define LIST_NEW      ((short) 3)     /* Delete old list and create new list */
  65.  
  66. /* Mode argument type for ads_mode_tile(); */
  67. #define MODE_ENABLE   ((short) 0)     /* Enable tile */
  68. #define MODE_DISABLE  ((short) 1)     /* Disable tile */
  69. #define MODE_SETFOCUS ((short) 2)     /* Set focus to tile */
  70. #define MODE_SETSEL   ((short) 3)     /* Set editbox selection--allows 
  71.                                          auto-clearing of old string */
  72. #define MODE_FLIP     ((short) 4)     /* Invert current state */
  73.  
  74.  
  75. /* For buffers that receive values for tiles.  The number is
  76.    arbitrary--it's just here to allow changing them all from
  77.    one place. */
  78. #define MAX_TILE_STR  40
  79. #define TILE_STR_LIMIT 255            /* real limit of dialog strings */
  80.  
  81. /* Dialog Functions */
  82.  
  83. ads_load_dialog _((char *dclfile, int *dcl_id));
  84. ads_unload_dialog _((int dcl_id));
  85. ads_new_dialog _((char *dlgname, int dcl_id, CLIENTFUNC def_callback,
  86.         ads_hdlg *hdlg));
  87. ads_new_positioned_dialog _((char *dlgname, int dcl_id, CLIENTFUNC def_callback,
  88.         int x, int y, ads_hdlg *hdlg));
  89. ads_start_dialog _((ads_hdlg hdlg, int *status));
  90. ads_term_dialog _((void));
  91. ads_action_tile _((ads_hdlg hdlg, char *key, CLIENTFUNC tilefunc));
  92. ads_done_dialog _((ads_hdlg hdlg, int status));
  93. ads_done_positioned_dialog _((ads_hdlg hdlg, int status, int *x_result, int *y_result));
  94. ads_set_tile _((ads_hdlg hdlg, char *key, char *value));
  95. ads_client_data_tile _((ads_hdlg hdlg, char *key, void *clientdata));
  96. ads_get_tile _((ads_hdlg hdlg, char *key, char *value, int
  97.         maxlen));
  98. ads_get_attr _((ads_hdlg hdlg, char *key, char *attr, char
  99.         *value, int len));
  100. ads_get_attr_string _((ads_htile tile, char *attr,
  101.         char *value, int len));
  102. ads_start_list _((ads_hdlg hdlg, char *key, short operation,
  103.         short index));
  104. ads_add_list _((char *item));
  105. ads_end_list _((void));
  106. ads_mode_tile _((ads_hdlg hdlg, char *key, short mode));
  107. ads_dimensions_tile _((ads_hdlg hdlg, char *key, short *cx, short
  108.         *cy));
  109. ads_start_image _((ads_hdlg hdlg, char *key));
  110. ads_vector_image _((short x1, short y1, short x2, short
  111.         y2, short color));
  112. ads_fill_image _((short x1, short y1, short x2, short y2,
  113.         short color));
  114. ads_slide_image _((short x1, short y1, short x2, short y2,
  115.         char *slnam));
  116. ads_end_image _((void));
  117.