+#define GENLIST_PROGRAM_FOCUS \
+ program { name: "focused"; \
+ signal: "elm,state,focused"; \
+ source: "elm"; \
+ action: STATE_SET "focused" 0.0; \
+ target: "focus_part"; \
+ } \
+ program { name: "unfocused"; \
+ signal: "elm,state,unfocused"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "focus_part"; \
+ }
+
+#define GENLIST_PROGRAM_FOCUS_NORMAL \
+ program { name: "focused"; \
+ signal: "elm,state,focused"; \
+ source: "elm"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"bg_reorder_clip", st, 30, vl); \
+ if (!strcmp(st, "reorder") || !strcmp(st, "decorate_reorder")) \
+ set_state(PART:"focus_part_reorder", "focused", 0.0); \
+ else \
+ set_state(PART:"focus_part", "focused", 0.0); \
+ } \
+ } \
+ program { name: "unfocused"; \
+ signal: "elm,state,unfocused"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "focus_part_reorder"; \
+ target: "focus_part"; \
+ }
+
+#define GENLIST_PROGRAM_FOCUS_DIALOGUE \
+ program { name: "focused"; \
+ signal: "elm,state,focused"; \
+ source: "elm"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"bg_dialogue", st, 30, vl); \
+ if (!strcmp(st, "top") || !strcmp(st, "top_selected") || !strcmp(st, "2depth_top")) \
+ set_state(PART:"focus_part_dialogue", "top_focused", 0.0); \
+ else if (!strcmp(st, "center") || !strcmp(st, "center_selected") || !strcmp(st, "2depth_center")) \
+ set_state(PART:"focus_part_dialogue", "center_focused", 0.0); \
+ else if (!strcmp(st, "bottom") || !strcmp(st, "bottom_selected") || !strcmp(st, "2depth_bottom")) \
+ set_state(PART:"focus_part_dialogue", "bottom_focused", 0.0); \
+ else if (!strcmp(st, "default") || !strcmp(st, "selected") || !strcmp(st, "2depth")) \
+ set_state(PART:"focus_part_dialogue", "focused", 0.0); \
+ } \
+ } \
+ program { name: "unfocused"; \
+ signal: "elm,state,unfocused"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "focus_part_dialogue"; \
+ }
+
+#define GENLIST_PROGRAM_SOUND( SRC ) \
+ program { \
+ name: "sound_disable"SRC; \
+ signal: "elm,state,slide,active"; \
+ source: "elm"; \
+ action: STATE_SET "disabled" 0.0; \
+ target: "base"; \
+ } \
+ program { \
+ name: "sound_enable"SRC; \
+ signal: "elm,state,slide,passive"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "base"; \
+ } \
+ program { name: "play_sound"SRC; \
+ signal: "mouse,clicked,1"; \
+ source: SRC; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"base", st, 30, vl); \
+ if (strcmp(st, "disabled")) \
+ run_program(PROGRAM:"play_button_press"SRC); \
+ } \
+ } \
+ program { name: "play_button_press"SRC; \
+ action: PLAY_SAMPLE "touch_sound" 1.0; \
+ }
+
+#define GENLIST_PROGRAM_REORDER_SOUND( SRC ) \
+ program { name: "play_sound"SRC; \
+ signal: "mouse,clicked,1"; \
+ source: SRC; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"base", st, 30, vl); \
+ if (strcmp(st, "disabled")) \
+ run_program(PROGRAM:"play_button_press"SRC); \
+ } \
+ } \
+ program { name: "play_button_press"SRC; \
+ action: PLAY_SAMPLE "reorder_sound" 1.0; \
+ }
+
+#define GENLIST_PROGRAM_SELECT( TARGET ) \
+ program { name: "selected"; \
+ signal: "elm,state,selected"; \
+ source: "elm"; \
+ action: STATE_SET "selected" 0.0; \
+ TARGET \
+ } \
+ program { name: "unselected"; \
+ signal: "elm,state,unselected"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ TARGET \
+ }
+
+#define GENLIST_PROGRAM_BG_DIALOGUE \
+ program { name: "bg_default"; \
+ signal: "elm,state,default"; \
+ source: "*"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"2depth", st, 30, vl); \
+ if (!strcmp(st, "2depth")) \
+ set_state(PART:"bg_dialogue", "2depth", 0.0); \
+ else \
+ set_state(PART:"bg_dialogue", "default", 0.0); \
+ } \
+ } \
+ program { name: "bg_top"; \
+ signal: "elm,state,top"; \
+ source: "*"; \