return mask;
}
-#ifdef FEAT_SOCKETSERVER
-# include <glib-unix.h>
-
-// Used to track the source for the listening socket
-static guint socket_server_source_id = 0;
-#endif
-
#if defined(FEAT_MOUSESHAPE)
// Last set mouse pointer shape
static int last_shape = 0;
return FAIL;
}
-#if defined(FEAT_SOCKETSERVER)
-
-/*
- * Callback for new events from the socket server listening socket.
- */
- static int
-socket_server_poll_in(int fd UNUSED, GIOCondition cond,
- void *user_data UNUSED)
-{
- if (cond & G_IO_IN)
- socket_server_accept_client();
- else if (cond & (G_IO_ERR | G_IO_HUP))
- {
- socket_server_uninit();
- return FALSE;
- }
-
- return TRUE;
-}
-
-#endif // FEAT_SOCKETSERVER
-
-/*
- * Initialize socket server for use in the GUI (does not actually initialize
- * the socket server, only attaches a source).
- */
- void
-gui_gtk_init_socket_server(void)
-{
-#if defined(FEAT_SOCKETSERVER)
- if (socket_server_source_id > 0)
- return;
- // Register source for file descriptor to global default context
- socket_server_source_id = g_unix_fd_add(socket_server_get_fd(),
- G_IO_IN | G_IO_ERR | G_IO_HUP, socket_server_poll_in, NULL);
-#endif
-}
-
-/*
- * Remove the source for the socket server listening socket.
- */
- void
-gui_gtk_uninit_socket_server(void)
-{
-#if defined(FEAT_SOCKETSERVER)
- if (socket_server_source_id > 0)
- {
- g_source_remove(socket_server_source_id);
- socket_server_source_id = 0;
- }
-#endif
-}
-
void
gui_gtk_set_mnemonics(int enable UNUSED)
{
int gui_gtk_draw_string_ext(int row, int col, char_u *s, int len, int flags, int force_pango);
int gui_gtk_draw_string(int row, int col, char_u *s, int len, int flags);
int gui_get_x11_windis(Window *win, Display **dis);
-void gui_gtk_init_socket_server(void);
-void gui_gtk_uninit_socket_server(void);
void gui_gtk_set_mnemonics(int enable);
void gui_make_popup(char_u *path_name, int mouse_pos);
int get_menu_tool_width(void);