* dialog.h: Moved and reformatted #definitions.

* execute.h: Likewise.
	* mouse.h: Likewise.
This commit is contained in:
Roland Illig 2005-02-08 06:57:14 +00:00
parent db5eec4964
commit 10451e0109
4 changed files with 28 additions and 27 deletions

View File

@ -1,5 +1,8 @@
2005-02-08 Roland Illig <roland.illig@gmx.de>
* dialog.h: Moved and reformatted #definitions.
* execute.h: Likewise.
* mouse.h: Likewise.
* widget.h: Moved constants to the appropriate places (just
before the variable they will be used with).
* widget.c: HISTORY_FILE_NAME was not needed in widget.h,

View File

@ -121,42 +121,39 @@ typedef cb_ret_t (*callback_fn) (Widget *widget, widget_msg_t msg, int parm);
struct Widget {
int x, y;
int cols, lines;
#define W_WANT_HOTKEY (1 << 1)
#define W_WANT_CURSOR (1 << 2)
#define W_WANT_IDLE (1 << 3)
#define W_IS_INPUT (1 << 4)
int options;
int dlg_id; /* Number of the widget, starting with 0 */
int dlg_id; /* Number of the widget, starting with 0 */
struct Widget *next;
struct Widget *prev;
callback_fn callback; /* The callback function */
callback_fn callback;
mouse_h mouse;
struct Dlg_head *parent;
};
/* The options for the widgets */
#define W_WANT_HOTKEY 2
#define W_WANT_CURSOR 4
#define W_WANT_IDLE 8
#define W_IS_INPUT 16
/* draw box in window */
void draw_box (Dlg_head *h, int y, int x, int ys, int xs);
/* doubled line if possible */
void draw_double_box (Dlg_head *h, int y, int x, int ys, int xs);
/* Flags for create_dlg: */
#define DLG_REVERSE (1 << 5) /* Tab order is opposite to the add order */
#define DLG_WANT_TAB (1 << 4) /* Should the tab key be sent to the dialog? */
#define DLG_WANT_IDLE (1 << 3) /* Dialog wants idle events */
#define DLG_COMPACT (1 << 2) /* Suppress spaces around the frame */
#define DLG_TRYUP (1 << 1) /* Try to move two lines up the dialog */
#define DLG_CENTER (1 << 0) /* Center the dialog */
#define DLG_NONE (000000) /* No options */
/* Creates a dialog head */
Dlg_head *create_dlg (int y1, int x1, int lines, int cols,
const int *color_set, dlg_cb_fn callback,
const char *help_ctx, const char *title, int flags);
/* The flags: */
#define DLG_REVERSE 32 /* Tab order is opposite to the add order */
#define DLG_WANT_TAB 16 /* Should the tab key be sent to the dialog? */
#define DLG_WANT_IDLE 8 /* Dialog wants idle events */
#define DLG_COMPACT 4 /* Suppress spaces around the frame */
#define DLG_TRYUP 2 /* Try to move two lines up the dialog */
#define DLG_CENTER 1 /* Center the dialog */
#define DLG_NONE 0 /* No options */
int add_widget (Dlg_head *dest, void *Widget);
/* Runs dialog d */

View File

@ -1,9 +1,10 @@
#ifndef MC_EXECUTE_H
#define MC_EXECUTE_H
#define EXECUTE_INTERNAL 1
#define EXECUTE_AS_SHELL 4
#define EXECUTE_HIDE 8
/* flags for shell_execute */
#define EXECUTE_INTERNAL (1 << 0)
#define EXECUTE_AS_SHELL (1 << 2)
#define EXECUTE_HIDE (1 << 3)
/* Execute functions that use the shell to execute */
void shell_execute (const char *command, int flags);

View File

@ -12,9 +12,9 @@
/* These lines are modified version from the lines appearing in the */
/* gpm.h include file of the Linux General Purpose Mouse server */
#define GPM_B_LEFT 4
#define GPM_B_MIDDLE 2
#define GPM_B_RIGHT 1
#define GPM_B_LEFT (1 << 2)
#define GPM_B_MIDDLE (1 << 1)
#define GPM_B_RIGHT (1 << 0)
/* Xterm mouse support supports only GPM_DOWN and GPM_UP */
/* If you use others make sure your code also works without them */
@ -73,11 +73,11 @@ void disable_mouse (void);
/* Mouse wheel events */
#ifndef GPM_B_DOWN
#define GPM_B_DOWN 32
#define GPM_B_DOWN (1 << 5)
#endif
#ifndef GPM_B_UP
#define GPM_B_UP 16
#define GPM_B_UP (1 << 4)
#endif
#ifdef HAVE_LIBGPM