summaryrefslogtreecommitdiff
path: root/include/tk.h
diff options
context:
space:
mode:
authorforsyth <forsyth@vitanuova.com>2010-03-22 14:30:56 +0000
committerforsyth <forsyth@vitanuova.com>2010-03-22 14:30:56 +0000
commit0db9190e73bd2b1391b1108a354b8cf089ab5374 (patch)
tree755b2e6d0779e37a8530ab7097a0403fb5813524 /include/tk.h
parentd764bd874c57ace45a2722fbc0c347ade01bc2f2 (diff)
20100322-1430
Diffstat (limited to 'include/tk.h')
-rw-r--r--include/tk.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/include/tk.h b/include/tk.h
index cff4aa54..8e2e4c30 100644
--- a/include/tk.h
+++ b/include/tk.h
@@ -153,6 +153,7 @@ typedef struct TkMethod TkMethod;
typedef struct TkAction TkAction;
typedef struct TkWin TkWin;
typedef struct TkCmdtab TkCmdtab;
+typedef struct TkMemimage TkMemimage;
typedef struct TkMouse TkMouse;
typedef struct TkVar TkVar;
typedef struct TkMsg TkMsg;
@@ -165,6 +166,8 @@ typedef struct TkGrid TkGrid;
typedef struct TkGridbeam TkGridbeam;
typedef struct TkGridcell TkGridcell;
+#pragma incomplete TkCol
+
struct TkImg
{
TkTop* top;
@@ -228,6 +231,13 @@ struct TkMouse
int b;
};
+struct TkMemimage
+{
+ Rectangle r;
+ ulong chans;
+ uchar data[];
+};
+
struct TkCmdtab
{
char* name;
@@ -410,7 +420,8 @@ struct TkGeom
int height;
};
-struct TkGridbeam {
+struct TkGridbeam
+{
int equalise;
int minsize;
int maxsize;
@@ -420,12 +431,14 @@ struct TkGridbeam {
char* name;
};
-struct TkGridcell {
+struct TkGridcell
+{
Tk* tk;
Point span;
};
-struct TkGrid {
+struct TkGrid
+{
TkGridcell** cells; /* 2D array of cells, y major, x minor */
Point dim; /* dimensions of table */
TkGridbeam* rows;
@@ -521,13 +534,6 @@ struct TkTtabstop
TkTtabstop* next;
};
-struct TkCol
-{
- ulong rgba;
- Image* i;
- TkCol* forw;
-};
-
struct TkCtxt
{
void* lock;
@@ -685,7 +691,7 @@ extern void tksetglobalfocus(TkTop*, int);
extern TkImg* tkname2img(TkTop*, char*);
extern void tkimgput(TkImg*);
extern void tksizeimage(Tk*, TkImg*);
-extern TkImg* tkauximage(TkTop*, char*, uchar*, int, int, Rectangle, int);
+extern TkImg* tkauximage(TkTop*, char*, TkMemimage*, int);
/* choicebuttons - menus.c */
extern Tk* tkfindchoicemenu(Tk*);
@@ -718,6 +724,8 @@ extern char* tkparsecolor(char*, ulong*);
extern Image* tkgc(TkEnv*, int);
extern Image* tkgshade(TkEnv*, int, int);
extern Image* tkcolor(TkCtxt*, ulong);
+extern Image* tkcolormix(TkCtxt*, ulong, ulong);
+extern Image* tkgradient(TkCtxt*, Rectangle, int, ulong, ulong);
extern void tkclear(Image*, Rectangle);
extern TkEnv* tknewenv(TkTop*);
extern TkEnv* tkdefaultenv(TkTop*);