diff options
author | Joakim Verona <joakim@verona.se> | 2011-07-14 23:16:18 +0200 |
---|---|---|
committer | Joakim Verona <joakim@verona.se> | 2011-07-14 23:16:18 +0200 |
commit | c43c0a65b7b7ef5899462a997734299aad3e9a00 (patch) | |
tree | 303832ba334bb45d679c24e9a0547ebab3fb4940 /src/xwidget.h | |
parent | 42f051946e70bb5e6ad407b85d003040d9ba5006 (diff) | |
download | emacs-c43c0a65b7b7ef5899462a997734299aad3e9a00.tar.gz |
begin moving xwidget storage to lisp. button test shows again since tag 0.1, so its not a completely useless version, but since the xwidget identity concept now changed from int to pointer, lots of code was commented out and needs rework
Diffstat (limited to 'src/xwidget.h')
-rw-r--r-- | src/xwidget.h | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/src/xwidget.h b/src/xwidget.h index b906b71c10b..181d2232518 100644 --- a/src/xwidget.h +++ b/src/xwidget.h @@ -2,8 +2,7 @@ void x_draw_xwidget_glyph_string (struct glyph_string *s); void syms_of_xwidget (); extern Lisp_Object Qxwidget; -/* Test for xwidget (xwidget . spec) (car must be the symbol xwidget)*/ -#define XWIDGETP(x) (CONSP (x) && EQ (XCAR (x), Qxwidget)) + int valid_xwidget_p (Lisp_Object object) ; @@ -12,33 +11,48 @@ int valid_xwidget_p (Lisp_Object object) ; /* each xwidget instance/model is described by this struct. + +lisp pseudovector. + + */ struct xwidget{ + struct vectorlike_header header; Lisp_Object plist;//auxilliary data Lisp_Object type;//the widget type - - int id; // id is stored inside the struct which is conveniont in some cases - char* title;//a title that is used for button labels for instance - - + Lisp_Object buffer; //buffer where xwidget lives + + //here ends the lisp part. + //"height" is the marker field int height; int width; - int initialized; - //for offscreen widgets, unused if not osr GtkWidget* widget_osr; GtkContainer* widgetwindow_osr; + //TODO these are WIP + char* title;//a title that is used for button labels for instance + + }; //struct for each xwidget view struct xwidget_view{ - struct xwidget* model; + struct vectorlike_header header; + struct xwidget* model; //TODO should be lisp + + + //here ends the lisp part. + //"redisplayed" is the marker field + int redisplayed; //if touched by redisplay + + struct window *w; //TODO should be lisp + int hidden;//if the "live" instance isnt drawn - int redisplayed; //if touched by redisplay + int initialized; GtkWidget* widget; @@ -46,13 +60,15 @@ struct xwidget_view{ GtkContainer* emacswindow; int x; int y; int clip_right; int clip_bottom; int clip_top; int clip_left; - struct window *w; + long handler_id; }; - +/* Test for xwidget (xwidget . spec) (car must be the symbol xwidget)*/ +#define XWIDGETP(x) (CONSP (x) && EQ (XCAR (x), Qxwidget)) +#define XXWIDGET(a) (eassert (XWIDGETP(a)),(struct xwidget *) XPNTR(a)) struct xwidget_type @@ -72,16 +88,16 @@ static struct xwidget_type *lookup_xwidget_type (Lisp_Object symbol); struct xwidget* xwidget_from_id(int id); -extern int xwidget_owns_kbd; +//extern int xwidget_owns_kbd; void xwidget_start_redisplay(); void xwidget_end_redisplay(struct glyph_matrix* matrix); void xwidget_touch (struct xwidget_view *xw); -void assert_valid_xwidget_id(int id,char *str); +//void assert_valid_xwidget_id(int id,char *str); -int lookup_xwidget (Lisp_Object spec); +struct xwidget* lookup_xwidget (Lisp_Object spec); #define XG_XWIDGET "emacs_xwidget" #define XG_XWIDGET_VIEW "emacs_xwidget_view" void xwidget_view_delete_all_in_window( struct window *w ); |