void menu_startup(gboolean reconfig);
void menu_shutdown(gboolean reconfig);
-ObMenu* menu_new(gchar *name, gchar *title, gpointer data);
+ObMenu* menu_new(const gchar *name, const gchar *title, gpointer data);
void menu_free(ObMenu *menu);
/* Repopulate a pipe-menu by running its command */
void menu_set_destroy_func(ObMenu *menu, ObMenuDestroyFunc func);
/* functions for building menus */
-ObMenuEntry* menu_add_normal(ObMenu *menu, gint id, gchar *label,
+ObMenuEntry* menu_add_normal(ObMenu *menu, gint id, const gchar *label,
GSList *actions);
-ObMenuEntry* menu_add_submenu(ObMenu *menu, gint id, gchar *submenu);
+ObMenuEntry* menu_add_submenu(ObMenu *menu, gint id, const gchar *submenu);
ObMenuEntry* menu_add_separator(ObMenu *menu, gint id);
void menu_clear_entries(ObMenu *menu);
RrReliefType *relief, RrBevelType *bevel,
gboolean *interlaced, gboolean *border,
gboolean allow_trans);
-static gboolean read_mask(ParseState *ps, gchar *maskname,
+static gboolean read_mask(ParseState *ps, const gchar *maskname,
RrPixmapMask **value);
static RrPixel32* read_c_image(gint width, gint height, const guint8 *data);
static void set_default_appearance(RrAppearance *a);
-static xmlNodePtr find_node(xmlNodePtr n, gchar *names[]);
-static gboolean find_int(ParseState *ps, xmlNodePtr n, gchar *names[],
+static xmlNodePtr find_node(xmlNodePtr n, const gchar *names[]);
+static gboolean find_int(ParseState *ps, xmlNodePtr n, const gchar *names[],
gint *integer, gint lower, gint upper);
-static gboolean find_string(ParseState *ps, xmlNodePtr n, gchar *names[],
- gchar **string);
-static gboolean find_color(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_string(ParseState *ps, xmlNodePtr n, const gchar *names[],
+ const gchar **string);
+static gboolean find_color(ParseState *ps, xmlNodePtr n, const gchar *names[],
RrColor **color, gchar *alpha);
- static gboolean find_point(ParseState *ps, xmlNodePtr n, gchar *names[],
+ static gboolean find_point(ParseState *ps, xmlNodePtr n, const gchar *names[],
gint *x, gint *y,
gint lowx, gint lowy, gint upx, gint upy);
-static gboolean find_shadow(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_shadow(ParseState *ps, xmlNodePtr n, const gchar *names[],
RrAppearance *a);
-static gboolean find_appearance(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_appearance(ParseState *ps, xmlNodePtr n, const gchar *names[],
RrAppearance *a, gboolean allow_trans);
/* make a null terminated array out of a list of strings */
-#define L(args...) (gchar*[]){args,NULL}
+#define L(args...) (const gchar*[]){args,NULL}
/* shortcut to the various find_* functions */
#define FIND(type, args...) find_##type(&ps, root, args)
ParseState ps;
xmlNodePtr root;
RrJustify winjust, mtitlejust;
- gchar *str;
+ const gchar *str;
RrTheme *theme;
if (name) {
}
}
-static gboolean read_mask(ParseState *ps, gchar *maskname,
+static gboolean read_mask(ParseState *ps, const gchar *maskname,
RrPixmapMask **value)
{
gboolean ret = FALSE;
}
}
-static xmlNodePtr find_node(xmlNodePtr n, gchar *names[])
+static xmlNodePtr find_node(xmlNodePtr n, const gchar *names[])
{
gint i;
return n;
}
-static gboolean find_int(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_int(ParseState *ps, xmlNodePtr n, const gchar *names[],
gint *integer, gint lower, gint upper)
{
gint i;
return FALSE;
}
-static gboolean find_string(ParseState *ps, xmlNodePtr n, gchar *names[],
- gchar **string)
+static gboolean find_string(ParseState *ps, xmlNodePtr n, const gchar *names[],
+ const gchar **string)
{
if ((n = find_node(n, names))) {
*string = parse_string(ps->doc, n);
return FALSE;
}
-static gboolean find_color(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_color(ParseState *ps, xmlNodePtr n, const gchar *names[],
RrColor **color, gchar *alpha)
{
if ((n = find_node(n, names))) {
return FALSE;
}
-static gboolean find_point(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_point(ParseState *ps, xmlNodePtr n, const gchar *names[],
gint *x, gint *y,
gint lowx, gint upx, gint lowy, gint upy)
{
return FALSE;
}
-static gboolean find_shadow(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_shadow(ParseState *ps, xmlNodePtr n, const gchar *names[],
RrAppearance *a)
{
return find_point(ps, n, names,
-20, 20, -20, 20);
}
-static gboolean find_appearance(ParseState *ps, xmlNodePtr n, gchar *names[],
+static gboolean find_appearance(ParseState *ps, xmlNodePtr n, const gchar *names[],
RrAppearance *a, gboolean allow_trans)
{
xmlNodePtr n2;