#ifndef _SESELMGR_H #define _SESELMGR_H #include #include #include #include #include #include #include #include #include #include #include enum { COL_NAME, COL_ATOM, COL_WIN, COL_TYPE, COL_DATA, COL_OCTX, COL_OFG, COL_OBG, COL_DCTX, COL_DFG, COL_DBG, COL_ICON, N_COLS }; struct thread_data { const gchar *display; GtkTreeModel *store; GtkTreeView *view; GtkWidget *appwin; GtkWidget *expwin; }; /* main.c */ extern unsigned timestamp; /* selmon.c */ int sel_monitor_init(struct thread_data *data); /* selmgr.c */ int sel_manager_init(struct thread_data *data); void sel_expose(GtkWidget *widget, GtkTreeView *view); void sel_expose_stop(GtkDialog *dialog, gint response_id, gpointer user_data); /* propmon.c */ int prop_monitor_init(struct thread_data *data); /* inputmon.c */ int input_monitor_init(struct thread_data *data); void input_relabel(GtkWidget *widget, GtkTreeView *view); void input_add(GtkWidget *widget, GtkTreeView *view); void input_remove(GtkWidget *widget, GtkTreeView *view); void input_activate(GtkWidget *widget, GtkTreeView *view); void input_configure(GtkWidget *widget, GtkTreeView *view); /* atom.c */ extern xcb_atom_t xa_targets; extern xcb_atom_t xa_prop; extern xcb_atom_t xa_incr; extern xcb_atom_t xa_atom; extern xcb_atom_t xa_text; extern xcb_atom_t wm_name; void atom_init(xcb_connection_t *conn); gboolean atom_is_string_type(xcb_atom_t atom); const char * atom_lookup(xcb_connection_t *conn, xcb_atom_t atom); const char * selection_lookup(xcb_connection_t *conn, xcb_window_t window, xcb_atom_t atom); void selection_register(xcb_connection_t *conn, xcb_window_t window); /* conn.c */ void make_connection(const gchar *name, xcb_connection_t **conn, Display **dpy); void check_xselinux(xcb_connection_t *conn); void check_xfixes(xcb_connection_t *conn); int fetch_property_data(xcb_connection_t *conn, xcb_window_t window, xcb_atom_t property, int delete, xcb_atom_t *type_rtn, unsigned *format_rtn, void **data_rtn, size_t *len_rtn); /* util.c */ #define APP_ERR(error, msg...) app_err(error, __func__, __LINE__, msg); void app_err(xcb_generic_error_t *error, const char *func, const int line, const char *fmt, ...) __attribute__ ((noreturn)); char * get_colors(security_context_t octx, security_context_t dctx); char * scrub_text(void *input); #endif