pcb 4.1.1
An interactive printed circuit board layout editor.
|
PCB HID main loop integration. More...
Go to the source code of this file.
Data Structures | |
struct | _IOWatchHandler |
struct | _TimeoutHandler |
Defines | |
#define | DBUS_API_SUBJECT_TO_CHANGE |
Typedefs | |
typedef struct _IOWatchHandler | IOWatchHandler |
typedef struct _TimeoutHandler | TimeoutHandler |
Functions | |
static void | block_hook_cb (hidval data) |
static void | io_watch_handler_dbus_freed (void *data) |
void | io_watch_handler_cb (hidval pcb_watch, int fd, unsigned int condition, hidval data) |
static void | timeout_handler_dbus_freed (void *data) |
void | timeout_handler_cb (hidval data) |
static dbus_bool_t | watch_add (DBusWatch *dbus_watch, void *data) |
static void | watch_remove (DBusWatch *dbus_watch, void *data) |
static void | watch_toggled (DBusWatch *dbus_watch, void *data) |
static dbus_bool_t | timeout_add (DBusTimeout *timeout, void *data) |
static void | timeout_remove (DBusTimeout *timeout, void *data) |
static void | timeout_toggled (DBusTimeout *timeout, void *data) |
void | dispatch_status_changed (DBusConnection *conn, DBusDispatchStatus new_status, void *data) |
void | pcb_dbus_connection_setup_with_mainloop (DBusConnection *connection) |
void | pcb_dbus_connection_finish_with_mainloop (DBusConnection *connection) |
PCB HID main loop integration.
Adapted from dbus-gmain.c from dbus-glib bindings:
Copyright (C) 2002, 2003 CodeFactory AB
Copyright (C) 2005 Red Hat, Inc.
Licensed under the Academic Free License version 2.1
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Definition in file dbus-pcbmain.c.
#define DBUS_API_SUBJECT_TO_CHANGE |
Definition at line 36 of file dbus-pcbmain.c.
typedef struct _IOWatchHandler IOWatchHandler |
Definition at line 43 of file dbus-pcbmain.c.
typedef struct _TimeoutHandler TimeoutHandler |
Definition at line 44 of file dbus-pcbmain.c.
static void block_hook_cb | ( | hidval | data | ) | [static] |
Definition at line 61 of file dbus-pcbmain.c.
References connection(), and hidval::ptr.
Referenced by pcb_dbus_connection_setup_with_mainloop().
void dispatch_status_changed | ( | DBusConnection * | conn, |
DBusDispatchStatus | new_status, | ||
void * | data | ||
) |
Definition at line 251 of file dbus-pcbmain.c.
Referenced by pcb_dbus_connection_setup_with_mainloop().
Definition at line 91 of file dbus-pcbmain.c.
References _IOWatchHandler::dbus_watch, PCB_WATCH_ERROR, PCB_WATCH_HANGUP, PCB_WATCH_READABLE, PCB_WATCH_WRITABLE, and hidval::ptr.
Referenced by watch_add().
static void io_watch_handler_dbus_freed | ( | void * | data | ) | [static] |
Definition at line 79 of file dbus-pcbmain.c.
References gui, _IOWatchHandler::pcb_watch, and hid_st::unwatch_file.
Referenced by watch_add().
void pcb_dbus_connection_finish_with_mainloop | ( | DBusConnection * | connection | ) |
Definition at line 321 of file dbus-pcbmain.c.
Referenced by pcb_dbus_finish().
void pcb_dbus_connection_setup_with_mainloop | ( | DBusConnection * | connection | ) |
Sets the watch and timeout functions of a #DBusConnection to integrate the connection with the GUI HID's main loop.
connection | the connection |
Definition at line 271 of file dbus-pcbmain.c.
References hid_st::add_block_hook, block_hook_cb(), dispatch_status_changed(), gui, hidval::ptr, timeout_add(), timeout_remove(), timeout_toggled(), watch_add(), watch_remove(), and watch_toggled().
Referenced by pcb_dbus_setup().
static dbus_bool_t timeout_add | ( | DBusTimeout * | timeout, |
void * | data | ||
) | [static] |
Definition at line 209 of file dbus-pcbmain.c.
References hid_st::add_timer, _TimeoutHandler::dbus_timeout, gui, _TimeoutHandler::interval, malloc(), _TimeoutHandler::pcb_timer, hidval::ptr, timeout_handler_cb(), timeout_handler_dbus_freed(), and TRUE.
Referenced by pcb_dbus_connection_setup_with_mainloop(), and timeout_toggled().
void timeout_handler_cb | ( | hidval | data | ) |
Definition at line 138 of file dbus-pcbmain.c.
References hid_st::add_timer, _TimeoutHandler::dbus_timeout, gui, _TimeoutHandler::interval, _TimeoutHandler::pcb_timer, and hidval::ptr.
Referenced by timeout_add().
static void timeout_handler_dbus_freed | ( | void * | data | ) | [static] |
Definition at line 126 of file dbus-pcbmain.c.
References gui, _TimeoutHandler::pcb_timer, and hid_st::stop_timer.
Referenced by timeout_add().
static void timeout_remove | ( | DBusTimeout * | timeout, |
void * | data | ||
) | [static] |
Definition at line 234 of file dbus-pcbmain.c.
Referenced by pcb_dbus_connection_setup_with_mainloop(), and timeout_toggled().
static void timeout_toggled | ( | DBusTimeout * | timeout, |
void * | data | ||
) | [static] |
Definition at line 241 of file dbus-pcbmain.c.
References timeout_add(), and timeout_remove().
Referenced by pcb_dbus_connection_setup_with_mainloop().
static dbus_bool_t watch_add | ( | DBusWatch * | dbus_watch, |
void * | data | ||
) | [static] |
Definition at line 154 of file dbus-pcbmain.c.
References _IOWatchHandler::dbus_watch, gui, io_watch_handler_cb(), io_watch_handler_dbus_freed(), malloc(), _IOWatchHandler::pcb_watch, PCB_WATCH_ERROR, PCB_WATCH_HANGUP, PCB_WATCH_READABLE, hidval::ptr, TRUE, and hid_st::watch_file.
Referenced by pcb_dbus_connection_setup_with_mainloop(), and watch_toggled().
static void watch_remove | ( | DBusWatch * | dbus_watch, |
void * | data | ||
) | [static] |
Definition at line 191 of file dbus-pcbmain.c.
Referenced by pcb_dbus_connection_setup_with_mainloop(), and watch_toggled().
static void watch_toggled | ( | DBusWatch * | dbus_watch, |
void * | data | ||
) | [static] |
Definition at line 198 of file dbus-pcbmain.c.
References watch_add(), and watch_remove().
Referenced by pcb_dbus_connection_setup_with_mainloop().