ZBar bar code reader . http://zbar.sourceforge.net/ ZBar is licensed under the GNU LGPL 2.1 to enable development of both open source and commercial projects.
Dependents: GR-PEACH_Camera_in_barcode levkov_ov7670
event.h
00001 /*------------------------------------------------------------------------ 00002 * Copyright 2007-2009 (c) Jeff Brown <spadix@users.sourceforge.net> 00003 * 00004 * This file is part of the ZBar Bar Code Reader. 00005 * 00006 * The ZBar Bar Code Reader is free software; you can redistribute it 00007 * and/or modify it under the terms of the GNU Lesser Public License as 00008 * published by the Free Software Foundation; either version 2.1 of 00009 * the License, or (at your option) any later version. 00010 * 00011 * The ZBar Bar Code Reader is distributed in the hope that it will be 00012 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00013 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU Lesser Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser Public License 00017 * along with the ZBar Bar Code Reader; if not, write to the Free 00018 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, 00019 * Boston, MA 02110-1301 USA 00020 * 00021 * http://sourceforge.net/projects/zbar 00022 *------------------------------------------------------------------------*/ 00023 #ifndef _ZBAR_EVENT_H_ 00024 #define _ZBAR_EVENT_H_ 00025 00026 #include <config.h> 00027 #include "mutex.h" 00028 #include "timer.h" 00029 00030 /* platform synchronization "event" abstraction 00031 */ 00032 00033 #if defined(_WIN32) 00034 00035 # include <windows.h> 00036 00037 typedef HANDLE zbar_event_t; 00038 00039 00040 #else 00041 00042 # ifdef HAVE_LIBPTHREAD 00043 # include <pthread.h> 00044 # endif 00045 00046 typedef struct zbar_event_s { 00047 int state; 00048 # ifdef HAVE_LIBPTHREAD 00049 pthread_cond_t cond; 00050 # endif 00051 int pollfd; 00052 } zbar_event_t; 00053 00054 #endif 00055 00056 00057 extern int _zbar_event_init(zbar_event_t*); 00058 extern void _zbar_event_destroy(zbar_event_t*); 00059 extern void _zbar_event_trigger(zbar_event_t*); 00060 extern int _zbar_event_wait(zbar_event_t*, zbar_mutex_t*, zbar_timer_t*); 00061 00062 #endif 00063
Generated on Tue Jul 12 2022 18:54:12 by 1.7.2