X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fprompt.h;h=b31a0c04655a58018331e15b36deeeebf86003c5;hb=deca45dadad1e0e1d5183341a601267f2deb1aa5;hp=6b27b8d8abc6def3cd9583a27da4474d40e835ad;hpb=c313b219a226c3b968ff312b96120eef0c527d91;p=chaz%2Fopenbox diff --git a/openbox/prompt.h b/openbox/prompt.h index 6b27b8d8..b31a0c04 100644 --- a/openbox/prompt.h +++ b/openbox/prompt.h @@ -26,12 +26,14 @@ typedef struct _ObPromptElement ObPromptElement; #include "geom.h" #include "render/render.h" #include +#include struct _ObPromptElement { gchar *text; Window window; gint x, y, width, height; + gboolean pressed; }; struct _ObPrompt @@ -39,12 +41,14 @@ struct _ObPrompt InternalWindow super; gint ref; + guint event_mask; + /* keep a copy of this because we re-render things that may need it (i.e. the buttons) */ RrAppearance *a_bg; gboolean mapped; - gint x, y, width, height; + gint width, height; gint msg_wbound; ObPromptElement msg; @@ -52,6 +56,9 @@ struct _ObPrompt /* one for each answer */ ObPromptElement *button; guint n_buttons; + + /* points to the button with the focus */ + ObPromptElement *focus; }; void prompt_startup(gboolean reconfig); @@ -62,7 +69,10 @@ void prompt_ref(ObPrompt *self); void prompt_unref(ObPrompt *self); /*! Show the prompt. It will be centered within the given area rectangle */ -void prompt_show(ObPrompt *self, const Rect *area); +void prompt_show(ObPrompt *self, struct _ObClient *parent); void prompt_hide(ObPrompt *self); +void prompt_key_event(ObPrompt *self, XEvent *e); +void prompt_mouse_event(ObPrompt *self, XEvent *e); + #endif