Files
cdesktop/cde/programs/dtappbuilder/src/ab/cgen_win_stubs.c
Jon Trulson cf410afbdb dtbuilder: fixup TOG copyrights issue in generated files.
The TOG copyrights were being removed after a rebuild, leaving behind
the scary "RESTRICTED" copyright text that was originally there.

The issue was that the TOG copyrights were not properly embedded
within a 'DTB_USER_CODE_START' code block.

dtcodegen does not preserve any code outside DT_USER_CODE START and
END blocks.

Additionally, these objects are built with -merge by dtcodgen, so the
existing 'RESTRICTED' header within the codeblocks was being retained.
2012-08-03 15:06:56 -06:00

485 lines
13 KiB
C

/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these librararies and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: cgen_win_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module cgen_win
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "cgen_win_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
#include <Dt/Term.h>
#include "dtbuilder.h"
#include "cgen_win_ui.h"
#include "cgen_props_ui.h"
#include "cgen_env_ui.h"
#include <ab_private/ab.h>
#include <ab_private/proj.h>
#include <ab_private/cgen.h>
#include <ab_private/obj_notify.h>
#include <ab_private/util.h>
#define public_entry_point() if (AB_cgen_win == NULL) { return 0; }
#include "dtb_utils.h"
/*
* End declarations of global widgets
*/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
void
cgen_win_help_pulldown_Using_Help_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("Help4Help", "_hometopic");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_Overview_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABCodeGenerator");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_Reference_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABCodeGenerator");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_Tasks_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABBuildandRun");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_On_Item_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_do_onitem_help();
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_gen_codeCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_gen_code(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_makeCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_make(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_runCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_run(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_make_runCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_make_run(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_abortCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_abort();
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
connP_set_insensitive(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/* widget is either the abort button or the abort menu item */
XtSetSensitive(widget, False);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_close_cgen_winCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenWinMainwindowInfo cgen_win =
(DtbCgenWinMainwindowInfo)clientData;
ui_win_show(cgen_win->mainwindow, False, XtGrabNone);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
connP_set_termp_inactive(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/* widget is the output term pane */
XtSetSensitive(widget, False);
/* Make the cursor stop blinking. */
XtVaSetValues(widget, DtNblinkRate, 0, NULL);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
connP_init_termp(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
STRING shell = NULL;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/* Make the cursor stop blinking. */
XtVaSetValues(widget, DtNblinkRate, 0, NULL);
/* Set the input term pane shell to be the same as the
* user's $SHELL environment variable.
*/
shell = (STRING) getenv("SHELL");
XtVaSetValues(widget, DtNsubprocessCmd, shell, NULL);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_cd_to_projCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
cgenP_sync_up_dir();
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_generate_entire_projCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*
* generate code for the entire project this one time.
*/
CG_GEN_FLAG orig_cmd_flag = CodeGenOptions.cmd_flag;
CodeGenOptions.cmd_flag = CG_GEN_PROJ_FLAG;
cgen_gen_code(CG_CMD_UNDEF);
CodeGenOptions.cmd_flag = orig_cmd_flag;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_show_cgen_optionsCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
if (AB_cgen_prop_dialog == (Widget) NULL)
{
/*
* Module initialization
*/
dtbCgenPropsCgenPropsDlgInfo_clear(&dtb_cgen_props_cgen_props_dlg);
dtb_cgen_props_cgen_props_dlg_initialize(&dtb_cgen_props_cgen_props_dlg,
AB_cgen_win);
AB_cgen_prop_dialog = dtb_cgen_props_cgen_props_dlg.cgen_props_dlg_shellform;
XtVaSetValues(AB_cgen_prop_dialog,
XmNuserData, dtb_cgen_props_cgen_props_dlg.module_list,
NULL);
ab_register_window(AB_cgen_prop_dialog, AB_WIN_DIALOG, WindowHidden,
XtParent(AB_cgen_win), AB_WPOS_TILE_HORIZONTAL,
cgenP_cancel_propsCB, (XtPointer)&dtb_cgen_props_cgen_props_dlg);
/* Update the project name for the prop sheet */
cgen_notify_props_new_proj(proj_get_project());
/* Initialize module list */
cgenP_init_props_module_list(dtb_cgen_props_cgen_props_dlg.module_list);
/* Add Rename and Destroy object callbacks to update module_list */
cgenP_prop_init();
}
ab_show_window(AB_cgen_prop_dialog);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_show_env_dlgCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
if (AB_cgen_env_dialog == (Widget) NULL)
{
dtbCgenEnvDialogInfo_clear(&dtb_cgen_env_dialog);
dtb_cgen_env_dialog_initialize(&dtb_cgen_env_dialog, AB_cgen_win);
AB_cgen_env_dialog = dtb_cgen_env_dialog.dialog_shellform;
ab_register_window(AB_cgen_env_dialog, AB_WIN_DIALOG, WindowHidden,
XtParent(AB_cgen_win), AB_WPOS_TILE_HORIZONTAL,
cgenP_cancel_envCB, (XtPointer)&dtb_cgen_env_dialog);
}
ab_show_window(AB_cgen_env_dialog);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/