/* * panes.h -- dtsystemsettings: the panes and their categories (panes.c) * * License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. * * C99 only, no X: test_panes.c tests it (make check). */ #ifndef _dtsystemsettings_panes_h #define _dtsystemsettings_panes_h enum PaneCategory { CAT_PERSONAL, CAT_HARDWARE, CAT_NETWORK, CAT_SYSTEM, CAT_COUNT }; enum PaneKind { PANE_OWN, /* drawn by dtsystemsettings (main.c) */ PANE_COMMAND, /* a program of the desktop opens it */ PANE_LATER /* named, not there yet: shown greyed */ }; typedef struct { const char *id; /* -pane ID: "sound", "network" ... */ const char *label; /* under the icon */ int category; /* enum PaneCategory */ const char *icon; /* an icon file of appconfig/icons/C */ int kind; /* enum PaneKind */ const char *command; /* PANE_COMMAND: a shell command line */ const char *keywords; /* what the search matches, English */ } Pane; extern const char *const categoryNames[CAT_COUNT]; extern const Pane panes[]; extern const int paneCount; /* the pane with ID, or NULL */ extern const Pane *PaneFind(const char *id); /* 1 when QUERY (already as typed) matches PANE: its id, its label or its * keywords, without case; an empty query matches every pane. No X, so * test_panes.c tests it. */ extern int PaneMatch(const Pane *p, const char *query); #endif /* _dtsystemsettings_panes_h */