This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* hello.c -- A minimal Tcl C extension. | |
*/ | |
#include <tcl.h> | |
static int | |
Hello_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) | |
{ | |
Tcl_SetObjResult(interp, Tcl_NewStringObj("Hello, World!", -1)); | |
return TCL_OK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oo::class create odict { | |
variable Dict | |
constructor {dict} {set Dict $dict} | |
forward exists my Val exists | |
forward filter my Val filter | |
forward get my Val get | |
forward info my Val info | |
forward keys my Val keys | |
forward merge my Val merge | |
forward remove my Val remove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# canvas_animate.tcl | |
# Animate canvas items. | |
# | |
# Usage: | |
# <canvas> animate <tagOrId> ?-xamount <pixels>? ?-yamount <pixels>? ?-duration <milliseconds>? ?-easing <function name>? ?-command <command>? | |
# <canvas> easings | |
# -> <list of easing function names> | |
# Rename the original 'canvas' command and redefine it to create a new object in this class. | |
# The object name will be identical to the path of the canvas, and the canvas command will |