mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
wmaker: Fix whitespace in menu.h; passes checkpatch.pl inspection.
This commit is contained in:
committed by
Carlos R. Mafra
parent
ac33bb9d1b
commit
c7c0b43629
116
src/menu.h
116
src/menu.h
@@ -30,76 +30,76 @@
|
|||||||
#define MI_SHADED 4
|
#define MI_SHADED 4
|
||||||
|
|
||||||
typedef struct WMenuEntry {
|
typedef struct WMenuEntry {
|
||||||
int order;
|
int order;
|
||||||
char *text; /* entry text */
|
char *text; /* entry text */
|
||||||
char *rtext; /* text to show in the right part */
|
char *rtext; /* text to show in the right part */
|
||||||
void (*callback)(struct WMenu *menu, struct WMenuEntry *entry);
|
void (*callback)(struct WMenu *menu, struct WMenuEntry *entry);
|
||||||
void (*free_cdata)(void *data); /* proc to be used to free clientdata */
|
void (*free_cdata)(void *data); /* proc to be used to free clientdata */
|
||||||
void *clientdata; /* data to pass to callback */
|
void *clientdata; /* data to pass to callback */
|
||||||
int cascade; /* cascade menu index */
|
int cascade; /* cascade menu index */
|
||||||
#ifdef USER_MENU
|
#ifdef USER_MENU
|
||||||
WMPropList *instances; /* allowed instances */
|
WMPropList *instances; /* allowed instances */
|
||||||
#endif /* USER_MENU */
|
#endif /* USER_MENU */
|
||||||
struct {
|
struct {
|
||||||
unsigned int enabled:1; /* entry is selectable */
|
unsigned int enabled:1; /* entry is selectable */
|
||||||
unsigned int indicator:1; /* left indicator */
|
unsigned int indicator:1; /* left indicator */
|
||||||
unsigned int indicator_on:1;
|
unsigned int indicator_on:1;
|
||||||
unsigned int indicator_type:3;
|
unsigned int indicator_type:3;
|
||||||
unsigned int editable:1;
|
unsigned int editable:1;
|
||||||
} flags;
|
} flags;
|
||||||
} WMenuEntry;
|
} WMenuEntry;
|
||||||
|
|
||||||
|
|
||||||
typedef struct WMenu {
|
typedef struct WMenu {
|
||||||
struct WMenu *parent;
|
struct WMenu *parent;
|
||||||
struct WMenu *brother;
|
struct WMenu *brother;
|
||||||
|
|
||||||
time_t timestamp; /* for the root menu. Last time
|
time_t timestamp; /* for the root menu. Last time
|
||||||
* menu was reloaded */
|
* menu was reloaded */
|
||||||
|
|
||||||
/* decorations */
|
/* decorations */
|
||||||
struct WFrameWindow *frame;
|
struct WFrameWindow *frame;
|
||||||
WCoreWindow *menu; /* the window menu */
|
WCoreWindow *menu; /* the window menu */
|
||||||
Pixmap menu_texture_data;
|
Pixmap menu_texture_data;
|
||||||
int frame_x, frame_y; /* position of the frame in root*/
|
int frame_x, frame_y; /* position of the frame in root*/
|
||||||
|
|
||||||
WMenuEntry **entries; /* array of entries. This is shared
|
WMenuEntry **entries; /* array of entries. This is shared
|
||||||
* by the menu and it's "brother" */
|
* by the menu and it's "brother" */
|
||||||
short alloced_entries; /* number of entries allocated in
|
short alloced_entries; /* number of entries allocated in
|
||||||
* entry array */
|
* entry array */
|
||||||
struct WMenu **cascades; /* array of cascades */
|
struct WMenu **cascades; /* array of cascades */
|
||||||
short cascade_no;
|
short cascade_no;
|
||||||
|
|
||||||
short entry_no; /* number of entries */
|
short entry_no; /* number of entries */
|
||||||
short selected_entry;
|
short selected_entry;
|
||||||
|
|
||||||
short entry_height; /* height of each entry */
|
short entry_height; /* height of each entry */
|
||||||
|
|
||||||
WMHandlerID timer; /* timer for the autoscroll */
|
WMHandlerID timer; /* timer for the autoscroll */
|
||||||
|
|
||||||
void *jump_back; /* jump back data */
|
void *jump_back; /* jump back data */
|
||||||
|
|
||||||
/* to be called when some entry is edited */
|
/* to be called when some entry is edited */
|
||||||
void (*on_edit)(struct WMenu *menu, struct WMenuEntry *entry);
|
void (*on_edit)(struct WMenu *menu, struct WMenuEntry *entry);
|
||||||
/* to be called when destroyed */
|
/* to be called when destroyed */
|
||||||
void (*on_destroy)(struct WMenu *menu);
|
void (*on_destroy)(struct WMenu *menu);
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned int titled:1;
|
unsigned int titled:1;
|
||||||
unsigned int realized:1; /* whether the window was configured */
|
unsigned int realized:1; /* whether the window was configured */
|
||||||
unsigned int app_menu:1; /* this is a application or root menu */
|
unsigned int app_menu:1; /* this is a application or root menu */
|
||||||
unsigned int mapped:1; /* if menu is already mapped on screen*/
|
unsigned int mapped:1; /* if menu is already mapped on screen*/
|
||||||
unsigned int buttoned:1; /* if the close button is visible
|
unsigned int buttoned:1; /* if the close button is visible
|
||||||
* (menu was torn off) */
|
* (menu was torn off) */
|
||||||
unsigned int open_to_left:1; /* direction to open submenus */
|
unsigned int open_to_left:1; /* direction to open submenus */
|
||||||
unsigned int lowered:1;
|
unsigned int lowered:1;
|
||||||
|
|
||||||
unsigned int brother:1; /* if this is a copy of the menu*/
|
unsigned int brother:1; /* if this is a copy of the menu*/
|
||||||
unsigned int editing:1;
|
unsigned int editing:1;
|
||||||
unsigned int jump_back_pending:1;
|
unsigned int jump_back_pending:1;
|
||||||
|
|
||||||
unsigned int inside_handler:1;
|
unsigned int inside_handler:1;
|
||||||
} flags;
|
} flags;
|
||||||
} WMenu;
|
} WMenu;
|
||||||
|
|
||||||
|
|
||||||
@@ -107,15 +107,15 @@ void wMenuPaint(WMenu *menu);
|
|||||||
void wMenuDestroy(WMenu *menu, int recurse);
|
void wMenuDestroy(WMenu *menu, int recurse);
|
||||||
void wMenuRealize(WMenu *menu);
|
void wMenuRealize(WMenu *menu);
|
||||||
WMenuEntry *wMenuInsertCascade(WMenu *menu, int index, const char *text,
|
WMenuEntry *wMenuInsertCascade(WMenu *menu, int index, const char *text,
|
||||||
WMenu *cascade);
|
WMenu *cascade);
|
||||||
WMenuEntry *wMenuInsertCallback(WMenu *menu, int index, const char *text,
|
WMenuEntry *wMenuInsertCallback(WMenu *menu, int index, const char *text,
|
||||||
void (*callback)(WMenu *menu, WMenuEntry *entry),
|
void (*callback)(WMenu *menu, WMenuEntry *entry),
|
||||||
void *clientdata);
|
void *clientdata);
|
||||||
|
|
||||||
void wMenuEntrySetCascade(WMenu *menu, WMenuEntry *entry, WMenu *cascade);
|
void wMenuEntrySetCascade(WMenu *menu, WMenuEntry *entry, WMenu *cascade);
|
||||||
|
|
||||||
#define wMenuAddCallback(menu, text, callback, data) \
|
#define wMenuAddCallback(menu, text, callback, data) \
|
||||||
wMenuInsertCallback(menu, -1, text, callback, data)
|
wMenuInsertCallback(menu, -1, text, callback, data)
|
||||||
|
|
||||||
void wMenuRemoveItem(WMenu *menu, int index);
|
void wMenuRemoveItem(WMenu *menu, int index);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user