home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / segal / file_stubs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-22  |  9.4 KB  |  468 lines

  1. /*
  2.  * file_stubs.c - Notify and event callback function stubs.
  3.  * This file was generated by `gxv' from `file.G'.
  4.  */
  5.  
  6. #include "common.h"
  7. #include <stdio.h>
  8. #include <sys/param.h>
  9. #include <sys/types.h>
  10. #include <xview/xview.h>
  11. #include <xview/panel.h>
  12. #include <xview/textsw.h>
  13. #include <xview/xv_xrect.h>
  14. #include "segal.h"
  15.  
  16. /*
  17.  * Notify callback function for `but_close_image'.
  18.  */
  19. void
  20. file_pop_load_image_but_close_image_notify_callback(item, event)
  21.     Panel_item    item;
  22.     Event        *event;
  23. {
  24.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  25.     
  26.     
  27.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  28.  
  29.     xv_set(File_pop_load_image->pop_load_image, XV_SHOW, FALSE, NULL);
  30.     
  31.     /* gxv_end_connections */
  32.  
  33. }
  34.  
  35. /*
  36.  * Notify callback function for `but_load_mask'.
  37.  */
  38. void
  39. load_mask(item, event)
  40.     Panel_item    item;
  41.     Event        *event;
  42. {
  43.     void load_mask_proc();
  44.  
  45.     file_pop_load_mask_objects *ip = (file_pop_load_mask_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  46.     
  47.     load_mask_proc();
  48.     
  49.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  50.  
  51.     /* gxv_end_connections */
  52.  
  53. }
  54.  
  55. /*
  56.  * Notify callback function for `but_close_mask'.
  57.  */
  58. void
  59. file_pop_load_mask_but_close_mask_notify_callback(item, event)
  60.     Panel_item    item;
  61.     Event        *event;
  62. {
  63.     file_pop_load_mask_objects *ip = (file_pop_load_mask_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  64.     
  65.     
  66.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  67.  
  68.     xv_set(File_pop_load_mask->pop_load_mask, XV_SHOW, FALSE, NULL);
  69.     
  70.     /* gxv_end_connections */
  71.  
  72. }
  73.  
  74. /*
  75.  * Notify callback function for `but_create_new'.
  76.  */
  77. void
  78. create_new(item, event)
  79.     Panel_item    item;
  80.     Event        *event;
  81. {
  82.     file_pop_new_mask_objects *ip = (file_pop_new_mask_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  83.     
  84.     
  85.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  86.     /* gxv_end_connections */
  87.  
  88. }
  89.  
  90. /*
  91.  * Notify callback function for `but_close_new'.
  92.  */
  93. void
  94. file_pop_new_mask_but_close_new_notify_callback(item, event)
  95.     Panel_item    item;
  96.     Event        *event;
  97. {
  98.     file_pop_new_mask_objects *ip = (file_pop_new_mask_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  99.     
  100.     
  101.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  102.  
  103.     xv_set(File_pop_new_mask->pop_new_mask, XV_SHOW, FALSE, NULL);
  104.     
  105.     /* gxv_end_connections */
  106.  
  107. }
  108.  
  109. /*
  110.  * Notify callback function for `but_create_new'.
  111.  */
  112. void
  113. create_mask(item, event)
  114.     Panel_item    item;
  115.     Event        *event;
  116. {
  117.     file_pop_new_mask_objects *ip = (file_pop_new_mask_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  118.     
  119.     
  120.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  121.     /* gxv_end_connections */
  122.  
  123. }
  124.  
  125. /*
  126.  * Notify callback function for `but_create_new'.
  127.  */
  128. void
  129. file_pop_new_mask_but_create_new_notify_callback(item, event)
  130.     Panel_item    item;
  131.     Event        *event;
  132. {
  133.     file_pop_new_mask_objects *ip = (file_pop_new_mask_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  134.     
  135.     
  136.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  137.  
  138.     {
  139.         new_mask_proc();
  140.     }
  141.     
  142.     /* gxv_end_connections */
  143.  
  144. }
  145.  
  146. /*
  147.  * Notify callback function for `but_save_mask_as'.
  148.  */
  149. void
  150. file_pop_save_as_but_save_mask_as_notify_callback(item, event)
  151.     Panel_item    item;
  152.     Event        *event;
  153. {
  154.     file_pop_save_as_objects *ip = (file_pop_save_as_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  155.     
  156.     
  157.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  158.  
  159.     {
  160.         save_mask_as();
  161.     }
  162.     
  163.     /* gxv_end_connections */
  164.  
  165. }
  166.  
  167. /*
  168.  * Event callback function for `but_close_save'.
  169.  */
  170. void
  171. file_pop_save_as_but_close_save_event_callback(item, event)
  172.     Panel_item    item;
  173.     Event        *event;
  174. {
  175.     file_pop_save_as_objects *ip = (file_pop_save_as_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  176.     
  177.     
  178.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  179.  
  180.     xv_set(File_pop_save_as->pop_save_as, XV_SHOW, FALSE, NULL);
  181.     
  182.     /* gxv_end_connections */
  183.  
  184.     panel_default_handle_event(item, event);
  185. }
  186.  
  187. /*
  188.  * Notify callback function for `but_i_save_as'.
  189.  */
  190. void
  191. file_pop_save_image_but_i_save_as_notify_callback(item, event)
  192.     Panel_item    item;
  193.     Event        *event;
  194. {
  195.     file_pop_save_image_objects *ip = (file_pop_save_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  196.     
  197.     
  198.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  199.  
  200.     {
  201.         save_image_as();
  202.     }
  203.     
  204.     /* gxv_end_connections */
  205.  
  206. }
  207.  
  208. /*
  209.  * Notify callback function for `but_i_close_save_as'.
  210.  */
  211. void
  212. file_pop_save_image_but_i_close_save_as_notify_callback(item, event)
  213.     Panel_item    item;
  214.     Event        *event;
  215. {
  216.     file_pop_save_image_objects *ip = (file_pop_save_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  217.     
  218.     
  219.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  220.  
  221.     xv_set(File_pop_save_image->pop_save_image, XV_SHOW, FALSE, NULL);
  222.     
  223.     /* gxv_end_connections */
  224.  
  225. }
  226.  
  227. /*
  228.  * Notify callback function for `but_load_header'.
  229.  */
  230. void
  231. file_pop_load_image_but_load_header_notify_callback(item, event)
  232.     Panel_item    item;
  233.     Event        *event;
  234. {
  235.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  236.     
  237.     
  238.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  239.     /* gxv_end_connections */
  240.  
  241. }
  242.  
  243. /*
  244.  * Notify callback function for `row_from'.
  245.  */
  246. Panel_setting
  247. file_pop_load_image_row_from_notify_callback(item, event)
  248.     Panel_item    item;
  249.     Event        *event;
  250. {
  251.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  252.     int    value = (int) xv_get(item, PANEL_VALUE);
  253.     
  254.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  255.  
  256.     {
  257.         segal.r1 = value;
  258.         if(segal.r2 < value) {
  259.             segal.r2 = value;
  260.             xv_set(File_pop_load_image->row_to,
  261.                 PANEL_VALUE, value,
  262.                 NULL);
  263.         }
  264.         update_bytes_required();
  265.     }
  266.     
  267.     /* gxv_end_connections */
  268.  
  269.     return panel_text_notify(item, event);
  270. }
  271.  
  272. /*
  273.  * Notify callback function for `row_to'.
  274.  */
  275. Panel_setting
  276. file_pop_load_image_row_to_notify_callback(item, event)
  277.     Panel_item    item;
  278.     Event        *event;
  279. {
  280.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  281.     int    value = (int) xv_get(item, PANEL_VALUE);
  282.     
  283.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  284.  
  285.     {
  286.         segal.r2 = value;
  287.         if(segal.r1 > value) {
  288.             segal.r1 = value;
  289.             xv_set(File_pop_load_image->row_from,
  290.                 PANEL_VALUE, value,
  291.                 NULL);
  292.         }
  293.         update_bytes_required();
  294.     }
  295.     
  296.     /* gxv_end_connections */
  297.  
  298.     return panel_text_notify(item, event);
  299. }
  300.  
  301. /*
  302.  * Notify callback function for `col_from'.
  303.  */
  304. Panel_setting
  305. file_pop_load_image_col_from_notify_callback(item, event)
  306.     Panel_item    item;
  307.     Event        *event;
  308. {
  309.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  310.     int    value = (int) xv_get(item, PANEL_VALUE);
  311.     
  312.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  313.  
  314.     {
  315.         segal.c1 = value;
  316.         if(segal.c2 < value) {
  317.             segal.c2 = value;
  318.             xv_set(File_pop_load_image->col_to,
  319.                 PANEL_VALUE, value,
  320.                 NULL);
  321.         }
  322.         update_bytes_required();
  323.     }
  324.     
  325.     /* gxv_end_connections */
  326.  
  327.     return panel_text_notify(item, event);
  328. }
  329.  
  330. /*
  331.  * Notify callback function for `col_to'.
  332.  */
  333. Panel_setting
  334. file_pop_load_image_col_to_notify_callback(item, event)
  335.     Panel_item    item;
  336.     Event        *event;
  337. {
  338.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  339.     int    value = (int) xv_get(item, PANEL_VALUE);
  340.     
  341.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  342.  
  343.     {
  344.         segal.c2 = value;
  345.         if(segal.c1 > value) {
  346.             segal.c1 = value;
  347.             xv_set(File_pop_load_image->col_from,
  348.                 PANEL_VALUE, value,
  349.                 NULL);
  350.         }
  351.         update_bytes_required();
  352.     }
  353.     
  354.     /* gxv_end_connections */
  355.  
  356.     return panel_text_notify(item, event);
  357. }
  358.  
  359. /*
  360.  * Notify callback function for `frm_from'.
  361.  */
  362. Panel_setting
  363. file_pop_load_image_frm_from_notify_callback(item, event)
  364.     Panel_item    item;
  365.     Event        *event;
  366. {
  367.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  368.     int    value = (int) xv_get(item, PANEL_VALUE);
  369.     
  370.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  371.  
  372.     {
  373.         segal.f1 = value;
  374.         if(segal.f2 < value) {
  375.             segal.f2 = value;
  376.             xv_set(File_pop_load_image->frm_to,
  377.                 PANEL_VALUE, value,
  378.                 NULL);
  379.         }
  380.         update_bytes_required();
  381.     }
  382.     
  383.     /* gxv_end_connections */
  384.  
  385.     return panel_text_notify(item, event);
  386. }
  387.  
  388. /*
  389.  * Notify callback function for `frm_to'.
  390.  */
  391. Panel_setting
  392. file_pop_load_image_frm_to_notify_callback(item, event)
  393.     Panel_item    item;
  394.     Event        *event;
  395. {
  396.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  397.     int    value = (int) xv_get(item, PANEL_VALUE);
  398.     
  399.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  400.  
  401.     {
  402.         segal.f2 = value;
  403.         if(segal.f1 > value) {
  404.             segal.f1 = value;
  405.             xv_set(File_pop_load_image->frm_from,
  406.                 PANEL_VALUE, value,
  407.                 NULL);
  408.         }
  409.         update_bytes_required();
  410.     }
  411.     
  412.     /* gxv_end_connections */
  413.  
  414.     return panel_text_notify(item, event);
  415. }
  416.  
  417. /*
  418.  * Notify callback function for `set_color_format'.
  419.  */
  420. void
  421. file_pop_load_image_set_color_format_notify_callback(item, value, event)
  422.     Panel_item    item;
  423.     int        value;
  424.     Event        *event;
  425. {
  426.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  427.     
  428.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  429.  
  430.     if (value == 0)
  431.     {
  432.         segal.color = TRUE;
  433.         update_bytes_required();
  434.     }
  435.     
  436.     if (value == 1)
  437.     {
  438.         segal.color = FALSE;
  439.         update_bytes_required();
  440.         img.hd.color_form = CFM_SGF;
  441.     }
  442.     
  443.     /* gxv_end_connections */
  444.  
  445. }
  446.  
  447. /*
  448.  * Notify callback function for `but_load_image'.
  449.  */
  450. void
  451. file_pop_load_image_but_load_image_notify_callback(item, event)
  452.     Panel_item    item;
  453.     Event        *event;
  454. {
  455.     file_pop_load_image_objects *ip = (file_pop_load_image_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  456.     
  457.     
  458.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  459.  
  460.     {
  461.         load_image();
  462.         
  463.     }
  464.     
  465.     /* gxv_end_connections */
  466.  
  467. }
  468.