aboutsummaryrefslogtreecommitdiffstats
path: root/src/xwidget.h
diff options
context:
space:
mode:
authorJoakim Verona2013-07-01 01:07:54 -0700
committerJoakim Verona2013-07-01 01:07:54 -0700
commit1ce45b902c67b8a0dda8d71bd2812de29a9988a6 (patch)
tree358fc8474007d2c88e6f33b39cb376596d55621a /src/xwidget.h
parente791b833abdf63dee8195b371dbf0f084b76e512 (diff)
parent204e1a81bcba51f955bf5a64782b3e43eea5ea76 (diff)
downloademacs-1ce45b902c67b8a0dda8d71bd2812de29a9988a6.tar.gz
emacs-1ce45b902c67b8a0dda8d71bd2812de29a9988a6.zip
Merge pull request #6 from daimrod/struct_to_Lisp_Object
Struct to lisp object
Diffstat (limited to 'src/xwidget.h')
-rw-r--r--src/xwidget.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/xwidget.h b/src/xwidget.h
index 530b087796c..f8c804aac46 100644
--- a/src/xwidget.h
+++ b/src/xwidget.h
@@ -43,22 +43,17 @@ struct xwidget{
43 43
44 44
45//struct for each xwidget view 45//struct for each xwidget view
46struct xwidget_view{ 46struct xwidget_view {
47 struct vectorlike_header header; 47 struct vectorlike_header header;
48 struct xwidget* model; //TODO should be lisp 48 Lisp_Object model;
49 49 Lisp_Object w;
50 50
51 //here ends the lisp part. 51 //here ends the lisp part.
52 //"redisplayed" is the marker field 52 //"redisplayed" is the marker field
53 int redisplayed; //if touched by redisplay 53 int redisplayed; //if touched by redisplay
54 54
55
56 struct window *w; //TODO should be lisp
57
58 int hidden;//if the "live" instance isnt drawn 55 int hidden;//if the "live" instance isnt drawn
59 56
60 int initialized;
61
62 GtkWidget* widget; 57 GtkWidget* widget;
63 GtkContainer* widgetwindow; 58 GtkContainer* widgetwindow;
64 GtkContainer* emacswindow; 59 GtkContainer* emacswindow;
@@ -72,10 +67,16 @@ struct xwidget_view{
72 67
73/* Test for xwidget (xwidget . spec) (car must be the symbol xwidget)*/ 68/* Test for xwidget (xwidget . spec) (car must be the symbol xwidget)*/
74#define XWIDGETP(x) (CONSP (x) && EQ (XCAR (x), Qxwidget)) 69#define XWIDGETP(x) (CONSP (x) && EQ (XCAR (x), Qxwidget))
70
75/* Test for xwidget pseudovector*/ 71/* Test for xwidget pseudovector*/
76#define XXWIDGETP(x) PSEUDOVECTORP (x, PVEC_XWIDGET) 72#define XXWIDGETP(x) PSEUDOVECTORP (x, PVEC_XWIDGET)
77#define XXWIDGET(a) (eassert (XXWIDGETP(a)),(struct xwidget *) XPNTR(a)) 73#define XXWIDGET(a) (eassert (XXWIDGETP(a)), \
74 (struct xwidget *) XUNTAG(a, Lisp_Vectorlike))
78 75
76/* Test for xwidget_view pseudovector */
77#define XXWIDGET_VIEW_P(x) PSEUDOVECTORP (x, PVEC_XWIDGET_VIEW)
78#define XXWIDGET_VIEW(a) (eassert (XXWIDGET_VIEW_P(a)), \
79 (struct xwidget_view *) XUNTAG(a, Lisp_Vectorlike))
79 80
80struct xwidget_type 81struct xwidget_type
81{ 82{