mirror of
https://github.com/amiwm/amiwm.git
synced 2026-03-24 01:24:15 +00:00
Marcus had written up workbench style widgets inside the two external helper programs requestchoice and executecmd. This ports the code over to libami. Note that there isn't a generic gadget or collection of gadgets yet - this is purely a refactor of the code, and the upcoming commit that migrates requestchoice/executecmd over to use them just handles them directly via xlib like they have always done.
36 lines
905 B
C
36 lines
905 B
C
#ifndef __LIBAMI_GADGET_TEXTBOX_H__
|
|
#define __LIBAMI_GADGET_TEXTBOX_H__
|
|
|
|
// These are for the text box widget
|
|
#define TXT_HSPACE 48
|
|
#define TXT_TOPSPACE 4
|
|
#define TXT_MIDSPACE 3
|
|
#define TXT_BOTSPACE 4
|
|
|
|
struct gadget_textbox_line {
|
|
struct gadget_textbox_line *next;
|
|
const char *text;
|
|
int l, w, h;
|
|
};
|
|
|
|
struct gadget_textbox {
|
|
Display *dpy;
|
|
struct DrawInfo *dri;
|
|
GC gc;
|
|
Window w;
|
|
int x, y;
|
|
int width, height;
|
|
|
|
struct gadget_textbox_line *firstline, *lastline;
|
|
};
|
|
|
|
extern struct gadget_textbox *gadget_textbox_create(Display *dpy,
|
|
struct DrawInfo *dri, GC gc, Window mainwin, int x, int y,
|
|
int width, int height);
|
|
extern void gadget_textbox_free(struct gadget_textbox *g);
|
|
extern struct gadget_textbox_line * gadget_textbox_addline(
|
|
struct gadget_textbox *g, const char *text);
|
|
extern void gadget_textbox_refresh(struct gadget_textbox *g);
|
|
|
|
#endif /* __LIBAMI_GADGET_TEXTBOX_H__ */
|