home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / videofrm / videfrm_.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  23.8 KB  |  906 lines

  1. /*
  2.  * VideoFrame_ui.c - User interface object initialization functions.
  3.  * This file was generated by `gxv' from `VideoFrame.G'.
  4.  * DO NOT EDIT BY HAND.
  5.  */
  6.  
  7. #include <stdio.h>
  8. #include <sys/param.h>
  9. #include <sys/types.h>
  10. #include <xview/xview.h>
  11. #include <xview/canvas.h>
  12. #include <xview/panel.h>
  13. #include <xview/scrollbar.h>
  14. #include <xview/svrimage.h>
  15. #include <xview/termsw.h>
  16. #include <xview/text.h>
  17. #include <xview/tty.h>
  18. #include <xview/xv_xrect.h>
  19. #include "VideoFrame_ui.h"
  20.  
  21. /*
  22.  * Create object `documentMenu' in the specified instance.
  23.  */
  24. Xv_opaque
  25. VideoFrame_documentMenu_create(caddr_t ip, Xv_opaque owner)
  26. {
  27.     extern Menu_item    NewHandler(Menu_item, Menu_generate);
  28.     extern Menu_item    OpenHandler(Menu_item, Menu_generate);
  29.     extern Menu_item    SaveHandler(Menu_item, Menu_generate);
  30.     extern Menu_item    SaveAsHandler(Menu_item, Menu_generate);
  31.     extern Menu_item    CloseHandler(Menu_item, Menu_generate);
  32.     extern Menu_item    QuitHandler(Menu_item, Menu_generate);
  33.     Xv_opaque    obj;
  34.     
  35.     obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
  36.         XV_KEY_DATA, INSTANCE, ip,
  37.         MENU_TITLE_ITEM, "Document",
  38.         MENU_ITEM,
  39.             XV_KEY_DATA, INSTANCE, ip,
  40.             MENU_STRING, "New",
  41.             MENU_GEN_PROC, NewHandler,
  42.             NULL,
  43.         MENU_ITEM,
  44.             XV_KEY_DATA, INSTANCE, ip,
  45.             MENU_STRING, "Open...",
  46.             MENU_GEN_PROC, OpenHandler,
  47.             NULL,
  48.         MENU_ITEM,
  49.             XV_KEY_DATA, INSTANCE, ip,
  50.             MENU_STRING, "Save",
  51.             MENU_GEN_PROC, SaveHandler,
  52.             NULL,
  53.         MENU_ITEM,
  54.             XV_KEY_DATA, INSTANCE, ip,
  55.             MENU_STRING, "Save As...",
  56.             MENU_GEN_PROC, SaveAsHandler,
  57.             NULL,
  58.         MENU_ITEM,
  59.             XV_KEY_DATA, INSTANCE, ip,
  60.             MENU_STRING, "Close",
  61.             MENU_GEN_PROC, CloseHandler,
  62.             NULL,
  63.         MENU_ITEM,
  64.             XV_KEY_DATA, INSTANCE, ip,
  65.             MENU_STRING, "Quit",
  66.             MENU_GEN_PROC, QuitHandler,
  67.             NULL,
  68.         MENU_DEFAULT, 3,
  69.         MENU_GEN_PIN_WINDOW, owner, "Document",
  70.         NULL);
  71.     return obj;
  72. }
  73.  
  74. /*
  75.  * Initialize an instance of object `mainWindow'.
  76.  */
  77. VideoFrame_mainWindow_objects *
  78. VideoFrame_mainWindow_objects_initialize(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  79. {
  80.     if (!ip && !(ip = (VideoFrame_mainWindow_objects *) calloc(1, sizeof (VideoFrame_mainWindow_objects))))
  81.         return (VideoFrame_mainWindow_objects *) NULL;
  82.     if (!ip->mainWindow)
  83.         ip->mainWindow = VideoFrame_mainWindow_mainWindow_create(ip, owner);
  84.     if (!ip->mainPanel)
  85.         ip->mainPanel = VideoFrame_mainWindow_mainPanel_create(ip, ip->mainWindow);
  86.     if (!ip->documentMenuButton)
  87.         ip->documentMenuButton = VideoFrame_mainWindow_documentMenuButton_create(ip, ip->mainPanel);
  88.     if (!ip->currentSelectionMessage)
  89.         ip->currentSelectionMessage = VideoFrame_mainWindow_currentSelectionMessage_create(ip, ip->mainPanel);
  90.     if (!ip->editList)
  91.         ip->editList = VideoFrame_mainWindow_editList_create(ip, ip->mainPanel);
  92.     if (!ip->labelField)
  93.         ip->labelField = VideoFrame_mainWindow_labelField_create(ip, ip->mainPanel);
  94.     if (!ip->addButton)
  95.         ip->addButton = VideoFrame_mainWindow_addButton_create(ip, ip->mainPanel);
  96.     if (!ip->modifyButton)
  97.         ip->modifyButton = VideoFrame_mainWindow_modifyButton_create(ip, ip->mainPanel);
  98.     if (!ip->deleteButton)
  99.         ip->deleteButton = VideoFrame_mainWindow_deleteButton_create(ip, ip->mainPanel);
  100.     if (!ip->deleteAllButton)
  101.         ip->deleteAllButton = VideoFrame_mainWindow_deleteAllButton_create(ip, ip->mainPanel);
  102.     if (!ip->input1Panel)
  103.         ip->input1Panel = VideoFrame_mainWindow_input1Panel_create(ip, ip->mainWindow);
  104.     if (!ip->input1Message)
  105.         ip->input1Message = VideoFrame_mainWindow_input1Message_create(ip, ip->input1Panel);
  106.     if (!ip->input1ShownChoice)
  107.         ip->input1ShownChoice = VideoFrame_mainWindow_input1ShownChoice_create(ip, ip->input1Panel);
  108.     if (!ip->input1CroppedChoice)
  109.         ip->input1CroppedChoice = VideoFrame_mainWindow_input1CroppedChoice_create(ip, ip->input1Panel);
  110.     if (!ip->input1AspectChoice)
  111.         ip->input1AspectChoice = VideoFrame_mainWindow_input1AspectChoice_create(ip, ip->input1Panel);
  112.     if (!ip->input1BrightSlider)
  113.         ip->input1BrightSlider = VideoFrame_mainWindow_input1BrightSlider_create(ip, ip->input1Panel);
  114.     if (!ip->input1ContrastSlider)
  115.         ip->input1ContrastSlider = VideoFrame_mainWindow_input1ContrastSlider_create(ip, ip->input1Panel);
  116.     if (!ip->input1SaturationSlider)
  117.         ip->input1SaturationSlider = VideoFrame_mainWindow_input1SaturationSlider_create(ip, ip->input1Panel);
  118.     if (!ip->input1HueSlider)
  119.         ip->input1HueSlider = VideoFrame_mainWindow_input1HueSlider_create(ip, ip->input1Panel);
  120.     if (!ip->input2Panel)
  121.         ip->input2Panel = VideoFrame_mainWindow_input2Panel_create(ip, ip->mainWindow);
  122.     if (!ip->input2Message)
  123.         ip->input2Message = VideoFrame_mainWindow_input2Message_create(ip, ip->input2Panel);
  124.     if (!ip->input2ShownChoice)
  125.         ip->input2ShownChoice = VideoFrame_mainWindow_input2ShownChoice_create(ip, ip->input2Panel);
  126.     if (!ip->input2CroppedChoice)
  127.         ip->input2CroppedChoice = VideoFrame_mainWindow_input2CroppedChoice_create(ip, ip->input2Panel);
  128.     if (!ip->input2AspectChoice)
  129.         ip->input2AspectChoice = VideoFrame_mainWindow_input2AspectChoice_create(ip, ip->input2Panel);
  130.     if (!ip->input2BrightSlider)
  131.         ip->input2BrightSlider = VideoFrame_mainWindow_input2BrightSlider_create(ip, ip->input2Panel);
  132.     if (!ip->input2ContrastSlider)
  133.         ip->input2ContrastSlider = VideoFrame_mainWindow_input2ContrastSlider_create(ip, ip->input2Panel);
  134.     if (!ip->input2SaturationSlider)
  135.         ip->input2SaturationSlider = VideoFrame_mainWindow_input2SaturationSlider_create(ip, ip->input2Panel);
  136.     if (!ip->input2HueSlider)
  137.         ip->input2HueSlider = VideoFrame_mainWindow_input2HueSlider_create(ip, ip->input2Panel);
  138.     return ip;
  139. }
  140.  
  141. /*
  142.  * Create object `mainWindow' in the specified instance.
  143.  */
  144. Xv_opaque
  145. VideoFrame_mainWindow_mainWindow_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  146. {
  147.     Xv_opaque    obj;
  148.     Xv_opaque        mainWindow_image;
  149.     static unsigned short    mainWindow_bits[] = {
  150. #include "icons/VideoFrame"
  151.     };
  152.     
  153.     mainWindow_image = xv_create(XV_NULL, SERVER_IMAGE,
  154.         SERVER_IMAGE_DEPTH, 1,
  155.         SERVER_IMAGE_BITS, mainWindow_bits,
  156.         XV_WIDTH, 64,
  157.         XV_HEIGHT, 64,
  158.         NULL);
  159.     obj = xv_create(owner, FRAME,
  160.         XV_KEY_DATA, INSTANCE, ip,
  161.         XV_WIDTH, 700,
  162.         XV_HEIGHT, 500,
  163.         XV_LABEL, "VideoFrame",
  164.         FRAME_SHOW_FOOTER, TRUE,
  165.         FRAME_SHOW_RESIZE_CORNER, TRUE,
  166.         FRAME_ICON, xv_create(XV_NULL, ICON,
  167.             ICON_IMAGE, mainWindow_image,
  168.             NULL),
  169.         NULL);
  170.     return obj;
  171. }
  172.  
  173. /*
  174.  * Create object `mainPanel' in the specified instance.
  175.  */
  176. Xv_opaque
  177. VideoFrame_mainWindow_mainPanel_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  178. {
  179.     Xv_opaque    obj;
  180.     
  181.     obj = xv_create(owner, PANEL,
  182.         XV_KEY_DATA, INSTANCE, ip,
  183.         XV_X, 0,
  184.         XV_Y, 0,
  185.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  186.         XV_HEIGHT, 200,
  187.         WIN_BORDER, FALSE,
  188.         NULL);
  189.     return obj;
  190. }
  191.  
  192. /*
  193.  * Create object `documentMenuButton' in the specified instance.
  194.  */
  195. Xv_opaque
  196. VideoFrame_mainWindow_documentMenuButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  197. {
  198.     Xv_opaque    obj;
  199.     
  200.     obj = xv_create(owner, PANEL_BUTTON,
  201.         XV_KEY_DATA, INSTANCE, ip,
  202.         XV_X, 32,
  203.         XV_Y, 16,
  204.         PANEL_LABEL_STRING, "Document",
  205.         PANEL_ITEM_MENU, VideoFrame_documentMenu_create((caddr_t) ip, ip->mainWindow),
  206.         NULL);
  207.     return obj;
  208. }
  209.  
  210. /*
  211.  * Create object `currentSelectionMessage' in the specified instance.
  212.  */
  213. Xv_opaque
  214. VideoFrame_mainWindow_currentSelectionMessage_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  215. {
  216.     Xv_opaque    obj;
  217.     
  218.     obj = xv_create(owner, PANEL_MESSAGE,
  219.         XV_KEY_DATA, INSTANCE, ip,
  220.         XV_X, 344,
  221.         XV_Y, 24,
  222.         PANEL_LABEL_STRING, "Current Selection : New Edit",
  223.         PANEL_LABEL_BOLD, TRUE,
  224.         NULL);
  225.     return obj;
  226. }
  227.  
  228. /*
  229.  * Create object `editList' in the specified instance.
  230.  */
  231. Xv_opaque
  232. VideoFrame_mainWindow_editList_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  233. {
  234.     extern int        EditListHandler(Panel_item, char *, Xv_opaque, Panel_list_op, Event *, int);
  235.     Xv_opaque    obj;
  236.     
  237.     obj = xv_create(owner, PANEL_LIST,
  238.         XV_KEY_DATA, INSTANCE, ip,
  239.         XV_X, 16,
  240.         XV_Y, 56,
  241.         PANEL_LIST_WIDTH, 250,
  242.         PANEL_LIST_DISPLAY_ROWS, 5,
  243.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  244.         PANEL_READ_ONLY, TRUE,
  245.         PANEL_CHOOSE_ONE, TRUE,
  246.         PANEL_CHOOSE_NONE, TRUE,
  247.         PANEL_NOTIFY_PROC, EditListHandler,
  248.         NULL);
  249.     return obj;
  250. }
  251.  
  252. /*
  253.  * Create object `labelField' in the specified instance.
  254.  */
  255. Xv_opaque
  256. VideoFrame_mainWindow_labelField_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  257. {
  258.     extern Panel_setting    LabelFieldHandler(Panel_item, Event *);
  259.     Xv_opaque    obj;
  260.     
  261.     obj = xv_create(owner, PANEL_TEXT,
  262.         XV_KEY_DATA, INSTANCE, ip,
  263.         XV_X, 344,
  264.         XV_Y, 72,
  265.         PANEL_VALUE_DISPLAY_LENGTH, 35,
  266.         PANEL_VALUE_STORED_LENGTH, 255,
  267.         PANEL_LABEL_STRING, "Label :",
  268.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  269.         PANEL_READ_ONLY, FALSE,
  270.         PANEL_NOTIFY_PROC, LabelFieldHandler,
  271.         NULL);
  272.     return obj;
  273. }
  274.  
  275. /*
  276.  * Create object `addButton' in the specified instance.
  277.  */
  278. Xv_opaque
  279. VideoFrame_mainWindow_addButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  280. {
  281.     extern void        AddHandler(Panel_item, Event *);
  282.     Xv_opaque    obj;
  283.     
  284.     obj = xv_create(owner, PANEL_BUTTON,
  285.         XV_KEY_DATA, INSTANCE, ip,
  286.         XV_X, 320,
  287.         XV_Y, 144,
  288.         PANEL_LABEL_STRING, "    Add     ",
  289.         PANEL_NOTIFY_PROC, AddHandler,
  290.         NULL);
  291.     return obj;
  292. }
  293.  
  294. /*
  295.  * Create object `modifyButton' in the specified instance.
  296.  */
  297. Xv_opaque
  298. VideoFrame_mainWindow_modifyButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  299. {
  300.     extern void        ModifyHandler(Panel_item, Event *);
  301.     Xv_opaque    obj;
  302.     
  303.     obj = xv_create(owner, PANEL_BUTTON,
  304.         XV_KEY_DATA, INSTANCE, ip,
  305.         XV_X, 406,
  306.         XV_Y, 144,
  307.         PANEL_LABEL_STRING, "  Modify   ",
  308.         PANEL_NOTIFY_PROC, ModifyHandler,
  309.         NULL);
  310.     return obj;
  311. }
  312.  
  313. /*
  314.  * Create object `deleteButton' in the specified instance.
  315.  */
  316. Xv_opaque
  317. VideoFrame_mainWindow_deleteButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  318. {
  319.     extern void        DeleteHandler(Panel_item, Event *);
  320.     Xv_opaque    obj;
  321.     
  322.     obj = xv_create(owner, PANEL_BUTTON,
  323.         XV_KEY_DATA, INSTANCE, ip,
  324.         XV_X, 492,
  325.         XV_Y, 144,
  326.         PANEL_LABEL_STRING, "  Delete  ",
  327.         PANEL_NOTIFY_PROC, DeleteHandler,
  328.         NULL);
  329.     return obj;
  330. }
  331.  
  332. /*
  333.  * Create object `deleteAllButton' in the specified instance.
  334.  */
  335. Xv_opaque
  336. VideoFrame_mainWindow_deleteAllButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  337. {
  338.     extern void        DeleteAllHandler(Panel_item, Event *);
  339.     Xv_opaque    obj;
  340.     
  341.     obj = xv_create(owner, PANEL_BUTTON,
  342.         XV_KEY_DATA, INSTANCE, ip,
  343.         XV_X, 578,
  344.         XV_Y, 144,
  345.         PANEL_LABEL_STRING, "Delete All ",
  346.         PANEL_NOTIFY_PROC, DeleteAllHandler,
  347.         NULL);
  348.     return obj;
  349. }
  350.  
  351. /*
  352.  * Create object `input1Panel' in the specified instance.
  353.  */
  354. Xv_opaque
  355. VideoFrame_mainWindow_input1Panel_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  356. {
  357.     Xv_opaque    obj;
  358.     
  359.     obj = xv_create(owner, PANEL,
  360.         XV_KEY_DATA, INSTANCE, ip,
  361.         XV_X, 0,
  362.         XV_Y, (int)xv_get(ip->mainPanel, XV_Y) +
  363.               (int)xv_get(ip->mainPanel, XV_HEIGHT),
  364.         XV_WIDTH, 350,
  365.         XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  366.         WIN_BORDER, TRUE,
  367.         NULL);
  368.     return obj;
  369. }
  370.  
  371. /*
  372.  * Create object `input1Message' in the specified instance.
  373.  */
  374. Xv_opaque
  375. VideoFrame_mainWindow_input1Message_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  376. {
  377.     Xv_opaque    obj;
  378.     
  379.     obj = xv_create(owner, PANEL_MESSAGE,
  380.         XV_KEY_DATA, INSTANCE, ip,
  381.         XV_X, 136,
  382.         XV_Y, 16,
  383.         PANEL_LABEL_STRING, "Input 1",
  384.         PANEL_LABEL_BOLD, TRUE,
  385.         NULL);
  386.     return obj;
  387. }
  388.  
  389. /*
  390.  * Create object `input1ShownChoice' in the specified instance.
  391.  */
  392. Xv_opaque
  393. VideoFrame_mainWindow_input1ShownChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  394. {
  395.     extern void        VideoFrame_mainWindow_input1ShownChoice_notify_callback(Panel_item, int, Event *);
  396.     Xv_opaque    obj;
  397.     
  398.     obj = xv_create(owner, PANEL_CHOICE,
  399.         XV_KEY_DATA, INSTANCE, ip,
  400.         XV_X, 16,
  401.         XV_Y, 56,
  402.         PANEL_CHOICE_NROWS, 1,
  403.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  404.         PANEL_CHOOSE_NONE, FALSE,
  405.         PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input1ShownChoice_notify_callback,
  406.         PANEL_CHOICE_STRINGS,
  407.             "Visible",
  408.             "Hidden",
  409.             NULL,
  410.         NULL);
  411.     return obj;
  412. }
  413.  
  414. /*
  415.  * Create object `input1CroppedChoice' in the specified instance.
  416.  */
  417. Xv_opaque
  418. VideoFrame_mainWindow_input1CroppedChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  419. {
  420.     extern void        VideoFrame_mainWindow_input1CroppedChoice_notify_callback(Panel_item, int, Event *);
  421.     Xv_opaque    obj;
  422.     
  423.     obj = xv_create(owner, PANEL_CHOICE,
  424.         XV_KEY_DATA, INSTANCE, ip,
  425.         XV_X, 200,
  426.         XV_Y, 56,
  427.         PANEL_CHOICE_NROWS, 1,
  428.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  429.         PANEL_CHOOSE_NONE, FALSE,
  430.         PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input1CroppedChoice_notify_callback,
  431.         PANEL_CHOICE_STRINGS,
  432.             "Crop",
  433.             "Squeeze",
  434.             NULL,
  435.         NULL);
  436.     return obj;
  437. }
  438.  
  439. /*
  440.  * Create object `input1AspectChoice' in the specified instance.
  441.  */
  442. Xv_opaque
  443. VideoFrame_mainWindow_input1AspectChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  444. {
  445.     extern void        VideoFrame_mainWindow_input1AspectChoice_notify_callback(Panel_item, int, Event *);
  446.     Xv_opaque    obj;
  447.     
  448.     obj = xv_create(owner, PANEL_CHOICE,
  449.         XV_KEY_DATA, INSTANCE, ip,
  450.         XV_X, 16,
  451.         XV_Y, 104,
  452.         PANEL_CHOICE_NROWS, 1,
  453.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  454.         PANEL_CHOOSE_NONE, FALSE,
  455.         PANEL_LABEL_STRING, "Aspect Ratio:",
  456.         PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input1AspectChoice_notify_callback,
  457.         PANEL_CHOICE_STRINGS,
  458.             "Any",
  459.             "4 : 3",
  460.             NULL,
  461.         NULL);
  462.     return obj;
  463. }
  464.  
  465. /*
  466.  * Create object `input1BrightSlider' in the specified instance.
  467.  */
  468. Xv_opaque
  469. VideoFrame_mainWindow_input1BrightSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  470. {
  471.     extern void        BrightnessHandler(Panel_item, int, Event *);
  472.     Xv_opaque    obj;
  473.     
  474.     obj = xv_create(owner, PANEL_SLIDER,
  475.         XV_KEY_DATA, INSTANCE, ip,
  476.         XV_X, 3,
  477.         XV_Y, 152,
  478.         PANEL_SLIDER_WIDTH, 200,
  479.         PANEL_TICKS, 0,
  480.         PANEL_LABEL_STRING, "Brightness :",
  481.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  482.         PANEL_SLIDER_END_BOXES, TRUE,
  483.         PANEL_SHOW_RANGE, FALSE,
  484.         PANEL_SHOW_VALUE, FALSE,
  485.         PANEL_MIN_VALUE, 0,
  486.         PANEL_MAX_VALUE, 255,
  487.         PANEL_VALUE, 0,
  488.         PANEL_NOTIFY_PROC, BrightnessHandler,
  489.         NULL);
  490.     return obj;
  491. }
  492.  
  493. /*
  494.  * Create object `input1ContrastSlider' in the specified instance.
  495.  */
  496. Xv_opaque
  497. VideoFrame_mainWindow_input1ContrastSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  498. {
  499.     extern void        ContrastHandler(Panel_item, int, Event *);
  500.     Xv_opaque    obj;
  501.     
  502.     obj = xv_create(owner, PANEL_SLIDER,
  503.         XV_KEY_DATA, INSTANCE, ip,
  504.         XV_X, 20,
  505.         XV_Y, 184,
  506.         PANEL_SLIDER_WIDTH, 200,
  507.         PANEL_TICKS, 0,
  508.         PANEL_LABEL_STRING, "Contrast :",
  509.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  510.         PANEL_SLIDER_END_BOXES, TRUE,
  511.         PANEL_SHOW_RANGE, FALSE,
  512.         PANEL_SHOW_VALUE, FALSE,
  513.         PANEL_MIN_VALUE, 0,
  514.         PANEL_MAX_VALUE, 255,
  515.         PANEL_VALUE, 0,
  516.         PANEL_NOTIFY_PROC, ContrastHandler,
  517.         NULL);
  518.     return obj;
  519. }
  520.  
  521. /*
  522.  * Create object `input1SaturationSlider' in the specified instance.
  523.  */
  524. Xv_opaque
  525. VideoFrame_mainWindow_input1SaturationSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  526. {
  527.     extern void        SaturationHandler(Panel_item, int, Event *);
  528.     Xv_opaque    obj;
  529.     
  530.     obj = xv_create(owner, PANEL_SLIDER,
  531.         XV_KEY_DATA, INSTANCE, ip,
  532.         XV_X, 7,
  533.         XV_Y, 216,
  534.         PANEL_SLIDER_WIDTH, 200,
  535.         PANEL_TICKS, 0,
  536.         PANEL_LABEL_STRING, "Saturation :",
  537.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  538.         PANEL_SLIDER_END_BOXES, TRUE,
  539.         PANEL_SHOW_RANGE, FALSE,
  540.         PANEL_SHOW_VALUE, FALSE,
  541.         PANEL_MIN_VALUE, 0,
  542.         PANEL_MAX_VALUE, 255,
  543.         PANEL_VALUE, 0,
  544.         PANEL_NOTIFY_PROC, SaturationHandler,
  545.         NULL);
  546.     return obj;
  547. }
  548.  
  549. /*
  550.  * Create object `input1HueSlider' in the specified instance.
  551.  */
  552. Xv_opaque
  553. VideoFrame_mainWindow_input1HueSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  554. {
  555.     extern void        HueHandler(Panel_item, int, Event *);
  556.     Xv_opaque    obj;
  557.     
  558.     obj = xv_create(owner, PANEL_SLIDER,
  559.         XV_KEY_DATA, INSTANCE, ip,
  560.         XV_X, 51,
  561.         XV_Y, 248,
  562.         PANEL_SLIDER_WIDTH, 200,
  563.         PANEL_TICKS, 0,
  564.         PANEL_LABEL_STRING, "Hue :",
  565.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  566.         PANEL_SLIDER_END_BOXES, TRUE,
  567.         PANEL_SHOW_RANGE, FALSE,
  568.         PANEL_SHOW_VALUE, FALSE,
  569.         PANEL_MIN_VALUE, 0,
  570.         PANEL_MAX_VALUE, 255,
  571.         PANEL_VALUE, 0,
  572.         PANEL_NOTIFY_PROC, HueHandler,
  573.         NULL);
  574.     return obj;
  575. }
  576.  
  577. /*
  578.  * Create object `input2Panel' in the specified instance.
  579.  */
  580. Xv_opaque
  581. VideoFrame_mainWindow_input2Panel_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  582. {
  583.     Xv_opaque    obj;
  584.     
  585.     obj = xv_create(owner, PANEL,
  586.         XV_KEY_DATA, INSTANCE, ip,
  587.         XV_X, (int)xv_get(ip->input1Panel, XV_X) +
  588.               (int)xv_get(ip->input1Panel, XV_WIDTH) + 2,
  589.         XV_Y, (int)xv_get(ip->mainPanel, XV_Y) +
  590.               (int)xv_get(ip->mainPanel, XV_HEIGHT),
  591.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  592.         XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  593.         WIN_BORDER, TRUE,
  594.         NULL);
  595.     return obj;
  596. }
  597.  
  598. /*
  599.  * Create object `input2Message' in the specified instance.
  600.  */
  601. Xv_opaque
  602. VideoFrame_mainWindow_input2Message_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  603. {
  604.     Xv_opaque    obj;
  605.     
  606.     obj = xv_create(owner, PANEL_MESSAGE,
  607.         XV_KEY_DATA, INSTANCE, ip,
  608.         XV_X, 146,
  609.         XV_Y, 16,
  610.         PANEL_LABEL_STRING, "Input 2",
  611.         PANEL_LABEL_BOLD, TRUE,
  612.         NULL);
  613.     return obj;
  614. }
  615.  
  616. /*
  617.  * Create object `input2ShownChoice' in the specified instance.
  618.  */
  619. Xv_opaque
  620. VideoFrame_mainWindow_input2ShownChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  621. {
  622.     extern void        VideoFrame_mainWindow_input2ShownChoice_notify_callback(Panel_item, int, Event *);
  623.     Xv_opaque    obj;
  624.     
  625.     obj = xv_create(owner, PANEL_CHOICE,
  626.         XV_KEY_DATA, INSTANCE, ip,
  627.         XV_X, 26,
  628.         XV_Y, 56,
  629.         PANEL_CHOICE_NROWS, 1,
  630.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  631.         PANEL_CHOOSE_NONE, FALSE,
  632.         PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input2ShownChoice_notify_callback,
  633.         PANEL_CHOICE_STRINGS,
  634.             "Visible",
  635.             "Hidden",
  636.             NULL,
  637.         NULL);
  638.     return obj;
  639. }
  640.  
  641. /*
  642.  * Create object `input2CroppedChoice' in the specified instance.
  643.  */
  644. Xv_opaque
  645. VideoFrame_mainWindow_input2CroppedChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  646. {
  647.     extern void        VideoFrame_mainWindow_input2CroppedChoice_notify_callback(Panel_item, int, Event *);
  648.     Xv_opaque    obj;
  649.     
  650.     obj = xv_create(owner, PANEL_CHOICE,
  651.         XV_KEY_DATA, INSTANCE, ip,
  652.         XV_X, 210,
  653.         XV_Y, 56,
  654.         PANEL_CHOICE_NROWS, 1,
  655.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  656.         PANEL_CHOOSE_NONE, FALSE,
  657.         PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input2CroppedChoice_notify_callback,
  658.         PANEL_CHOICE_STRINGS,
  659.             "Crop",
  660.             "Squeeze",
  661.             NULL,
  662.         NULL);
  663.     return obj;
  664. }
  665.  
  666. /*
  667.  * Create object `input2AspectChoice' in the specified instance.
  668.  */
  669. Xv_opaque
  670. VideoFrame_mainWindow_input2AspectChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  671. {
  672.     extern void        VideoFrame_mainWindow_input2AspectChoice_notify_callback(Panel_item, int, Event *);
  673.     Xv_opaque    obj;
  674.     
  675.     obj = xv_create(owner, PANEL_CHOICE,
  676.         XV_KEY_DATA, INSTANCE, ip,
  677.         XV_X, 26,
  678.         XV_Y, 104,
  679.         PANEL_CHOICE_NROWS, 1,
  680.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  681.         PANEL_CHOOSE_NONE, FALSE,
  682.         PANEL_LABEL_STRING, "Aspect Ratio:",
  683.         PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input2AspectChoice_notify_callback,
  684.         PANEL_CHOICE_STRINGS,
  685.             "Any",
  686.             "4 : 3",
  687.             NULL,
  688.         NULL);
  689.     return obj;
  690. }
  691.  
  692. /*
  693.  * Create object `input2BrightSlider' in the specified instance.
  694.  */
  695. Xv_opaque
  696. VideoFrame_mainWindow_input2BrightSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  697. {
  698.     extern void        BrightnessHandler(Panel_item, int, Event *);
  699.     Xv_opaque    obj;
  700.     
  701.     obj = xv_create(owner, PANEL_SLIDER,
  702.         XV_KEY_DATA, INSTANCE, ip,
  703.         XV_X, 8,
  704.         XV_Y, 152,
  705.         PANEL_SLIDER_WIDTH, 200,
  706.         PANEL_TICKS, 0,
  707.         PANEL_LABEL_STRING, "Brightness :",
  708.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  709.         PANEL_SLIDER_END_BOXES, TRUE,
  710.         PANEL_SHOW_RANGE, FALSE,
  711.         PANEL_SHOW_VALUE, FALSE,
  712.         PANEL_MIN_VALUE, 0,
  713.         PANEL_MAX_VALUE, 255,
  714.         PANEL_VALUE, 0,
  715.         PANEL_NOTIFY_PROC, BrightnessHandler,
  716.         NULL);
  717.     return obj;
  718. }
  719.  
  720. /*
  721.  * Create object `input2ContrastSlider' in the specified instance.
  722.  */
  723. Xv_opaque
  724. VideoFrame_mainWindow_input2ContrastSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  725. {
  726.     extern void        ContrastHandler(Panel_item, int, Event *);
  727.     Xv_opaque    obj;
  728.     
  729.     obj = xv_create(owner, PANEL_SLIDER,
  730.         XV_KEY_DATA, INSTANCE, ip,
  731.         XV_X, 25,
  732.         XV_Y, 184,
  733.         PANEL_SLIDER_WIDTH, 200,
  734.         PANEL_TICKS, 0,
  735.         PANEL_LABEL_STRING, "Contrast :",
  736.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  737.         PANEL_SLIDER_END_BOXES, TRUE,
  738.         PANEL_SHOW_RANGE, FALSE,
  739.         PANEL_SHOW_VALUE, FALSE,
  740.         PANEL_MIN_VALUE, 0,
  741.         PANEL_MAX_VALUE, 255,
  742.         PANEL_VALUE, 0,
  743.         PANEL_NOTIFY_PROC, ContrastHandler,
  744.         NULL);
  745.     return obj;
  746. }
  747.  
  748. /*
  749.  * Create object `input2SaturationSlider' in the specified instance.
  750.  */
  751. Xv_opaque
  752. VideoFrame_mainWindow_input2SaturationSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  753. {
  754.     extern void        SaturationHandler(Panel_item, int, Event *);
  755.     Xv_opaque    obj;
  756.     
  757.     obj = xv_create(owner, PANEL_SLIDER,
  758.         XV_KEY_DATA, INSTANCE, ip,
  759.         XV_X, 12,
  760.         XV_Y, 216,
  761.         PANEL_SLIDER_WIDTH, 200,
  762.         PANEL_TICKS, 0,
  763.         PANEL_LABEL_STRING, "Saturation :",
  764.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  765.         PANEL_SLIDER_END_BOXES, TRUE,
  766.         PANEL_SHOW_RANGE, FALSE,
  767.         PANEL_SHOW_VALUE, FALSE,
  768.         PANEL_MIN_VALUE, 0,
  769.         PANEL_MAX_VALUE, 255,
  770.         PANEL_VALUE, 0,
  771.         PANEL_NOTIFY_PROC, SaturationHandler,
  772.         NULL);
  773.     return obj;
  774. }
  775.  
  776. /*
  777.  * Create object `input2HueSlider' in the specified instance.
  778.  */
  779. Xv_opaque
  780. VideoFrame_mainWindow_input2HueSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
  781. {
  782.     extern void        HueHandler(Panel_item, int, Event *);
  783.     Xv_opaque    obj;
  784.     
  785.     obj = xv_create(owner, PANEL_SLIDER,
  786.         XV_KEY_DATA, INSTANCE, ip,
  787.         XV_X, 56,
  788.         XV_Y, 248,
  789.         PANEL_SLIDER_WIDTH, 200,
  790.         PANEL_TICKS, 0,
  791.         PANEL_LABEL_STRING, "Hue :",
  792.         PANEL_DIRECTION, PANEL_HORIZONTAL,
  793.         PANEL_SLIDER_END_BOXES, TRUE,
  794.         PANEL_SHOW_RANGE, FALSE,
  795.         PANEL_SHOW_VALUE, FALSE,
  796.         PANEL_MIN_VALUE, 0,
  797.         PANEL_MAX_VALUE, 255,
  798.         PANEL_VALUE, 0,
  799.         PANEL_NOTIFY_PROC, HueHandler,
  800.         NULL);
  801.     return obj;
  802. }
  803.  
  804. /*
  805.  * Initialize an instance of object `inputWindow1'.
  806.  */
  807. VideoFrame_inputWindow1_objects *
  808. VideoFrame_inputWindow1_objects_initialize(VideoFrame_inputWindow1_objects *ip, Xv_opaque owner)
  809. {
  810.     if (!ip && !(ip = (VideoFrame_inputWindow1_objects *) calloc(1, sizeof (VideoFrame_inputWindow1_objects))))
  811.         return (VideoFrame_inputWindow1_objects *) NULL;
  812.     if (!ip->inputWindow1)
  813.         ip->inputWindow1 = VideoFrame_inputWindow1_inputWindow1_create(ip, owner);
  814.     return ip;
  815. }
  816.  
  817. /*
  818.  * Create object `inputWindow1' in the specified instance.
  819.  */
  820. Xv_opaque
  821. VideoFrame_inputWindow1_inputWindow1_create(VideoFrame_inputWindow1_objects *ip, Xv_opaque owner)
  822. {
  823.     extern Notify_value    VideoFrame_inputWindow1_event_callback(Xv_window, Event *, Notify_arg, Notify_event_type);
  824.     Xv_opaque    obj;
  825.     Xv_opaque        inputWindow1_image;
  826.     static unsigned short    inputWindow1_bits[] = {
  827. #include "icons/1"
  828.     };
  829.     
  830.     inputWindow1_image = xv_create(XV_NULL, SERVER_IMAGE,
  831.         SERVER_IMAGE_DEPTH, 1,
  832.         SERVER_IMAGE_BITS, inputWindow1_bits,
  833.         XV_WIDTH, 64,
  834.         XV_HEIGHT, 64,
  835.         NULL);
  836.     obj = xv_create(owner, FRAME,
  837.         XV_KEY_DATA, INSTANCE, ip,
  838.         XV_WIDTH, 640,
  839.         XV_HEIGHT, 480,
  840.         XV_LABEL, "Input1",
  841.         XV_SHOW, TRUE,
  842.         FRAME_SHOW_FOOTER, FALSE,
  843.         FRAME_SHOW_RESIZE_CORNER, TRUE,
  844.         FRAME_ICON, xv_create(XV_NULL, ICON,
  845.             ICON_IMAGE, inputWindow1_image,
  846.             NULL),
  847.         NULL);
  848.     xv_set(obj, WIN_CONSUME_EVENTS,
  849.         NULL, NULL);
  850.     notify_interpose_event_func(obj,
  851.         (Notify_func) VideoFrame_inputWindow1_event_callback, NOTIFY_SAFE);
  852.     return obj;
  853. }
  854.  
  855. /*
  856.  * Initialize an instance of object `inputWindow2'.
  857.  */
  858. VideoFrame_inputWindow2_objects *
  859. VideoFrame_inputWindow2_objects_initialize(VideoFrame_inputWindow2_objects *ip, Xv_opaque owner)
  860. {
  861.     if (!ip && !(ip = (VideoFrame_inputWindow2_objects *) calloc(1, sizeof (VideoFrame_inputWindow2_objects))))
  862.         return (VideoFrame_inputWindow2_objects *) NULL;
  863.     if (!ip->inputWindow2)
  864.         ip->inputWindow2 = VideoFrame_inputWindow2_inputWindow2_create(ip, owner);
  865.     return ip;
  866. }
  867.  
  868. /*
  869.  * Create object `inputWindow2' in the specified instance.
  870.  */
  871. Xv_opaque
  872. VideoFrame_inputWindow2_inputWindow2_create(VideoFrame_inputWindow2_objects *ip, Xv_opaque owner)
  873. {
  874.     extern Notify_value    VideoFrame_inputWindow2_event_callback(Xv_window, Event *, Notify_arg, Notify_event_type);
  875.     Xv_opaque    obj;
  876.     Xv_opaque        inputWindow2_image;
  877.     static unsigned short    inputWindow2_bits[] = {
  878. #include "icons/2"
  879.     };
  880.     
  881.     inputWindow2_image = xv_create(XV_NULL, SERVER_IMAGE,
  882.         SERVER_IMAGE_DEPTH, 1,
  883.         SERVER_IMAGE_BITS, inputWindow2_bits,
  884.         XV_WIDTH, 64,
  885.         XV_HEIGHT, 64,
  886.         NULL);
  887.     obj = xv_create(owner, FRAME,
  888.         XV_KEY_DATA, INSTANCE, ip,
  889.         XV_WIDTH, 640,
  890.         XV_HEIGHT, 480,
  891.         XV_LABEL, "Input2",
  892.         XV_SHOW, TRUE,
  893.         FRAME_SHOW_FOOTER, FALSE,
  894.         FRAME_SHOW_RESIZE_CORNER, TRUE,
  895.         FRAME_ICON, xv_create(XV_NULL, ICON,
  896.             ICON_IMAGE, inputWindow2_image,
  897.             NULL),
  898.         NULL);
  899.     xv_set(obj, WIN_CONSUME_EVENTS,
  900.         NULL, NULL);
  901.     notify_interpose_event_func(obj,
  902.         (Notify_func) VideoFrame_inputWindow2_event_callback, NOTIFY_SAFE);
  903.     return obj;
  904. }
  905.  
  906.