Tcl_HashTable DateCmds;
int DateUpdateTime = 200;
+void DoUpdateDate(SimDate *date);
+void DoNewDate(SimDate *date);
+void DoResizeDate(SimDate *date, int w, int h);
+void DestroyDate(SimDate *date);
+void InitNewDate(SimDate *date);
+int ConfigureSimDate(Tcl_Interp *interp, SimDate *date,
+ int argc, char **argv, int flags);
+
#define DEF_DATE_FONT "-Adobe-Helvetica-Bold-R-Normal-*-140-*"
#define DEF_DATE_BG_COLOR "#b0b0b0"
{
SimDate *date = (SimDate *) clientData;
Tk_Window tkwin = date->tkwin;
- Pixmap pm = None;
- Drawable d;
date->flags &= ~VIEW_REDRAW_PENDING;
//fprintf(stderr, "DisplaySimDate cleared VIEW_REDRAW_PENDING\n");
}
+void
EventuallyRedrawDate(SimDate *date)
{
if (!(date->flags & VIEW_REDRAW_PENDING)) {
int DateCmdposition(DATE_ARGS)
{
- int result = TCL_OK;
-
if ((argc != 2) && (argc != 4)) {
return TCL_ERROR;
}
int DateCmdReset(DATE_ARGS)
{
- int range;
-
if (argc != 2) {
Tcl_AppendResult(interp, "wrong # args", (char *) NULL);
return TCL_ERROR;
int DateCmdSet(DATE_ARGS)
{
- int range;
-
if (argc != 4) {
Tcl_AppendResult(interp, "wrong # args", (char *) NULL);
return TCL_ERROR;
return TCL_ERROR;
}
- if (ent = Tcl_FindHashEntry(&DateCmds, argv[1])) {
+ if ((ent = Tcl_FindHashEntry(&DateCmds, argv[1]))) {
cmd = (int (*)())ent->clientData;
Tk_Preserve((ClientData) date);
result = cmd(date, interp, argc, argv);
}
-date_command_init()
+void
+date_command_init(void)
{
- int new;
-
Tcl_CreateCommand(tk_mainInterp, "dateview", DateViewCmd,
(ClientData)MainWindow, (void (*)()) NULL);
}
+void
InitNewDate(SimDate *date)
{
- int d = 8;
- struct XDisplay *xd;
-
date->next = NULL;
/* This stuff was initialized in our caller (DateCmd) */
}
+void
DestroyDate(SimDate *date)
{
SimDate **gp;
}
+void
DoResizeDate(SimDate *date, int w, int h)
{
- int resize = 0;
-
date->w_width = w; date->w_height = h;
if (date->pixmap != None) {
}
+void
DoNewDate(SimDate *date)
{
sim->dates++; date->next = sim->date; sim->date = date;
#define BORDER 1
+void
DoUpdateDate(SimDate *date)
{
Display *dpy;
GC gc;
Pixmap pm;
int *pix;
- int w, h, i, j, x, y;
+ int w, h, x, y;
int tx, ty;
- float sx, sy;
if (!date->visible) {
return;