| jcommonlib.h | | jcommonlib.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * GNU General Public License for more details.
* | | * GNU General Public License for more details.
* | |
| *
* | | *
* | |
| * You should have received a copy of the GNU General Public License
* | | * You should have received a copy of the GNU General Public License
* | |
| * along with this program; if not, write to the
* | | * along with this program; if not, write to the
* | |
| * Free Software Foundation, Inc.,
* | | * Free Software Foundation, Inc.,
* | |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | |
| **************************************************************************
*/ | | **************************************************************************
*/ | |
| #ifndef J_COMMONLIB_H | | #ifndef J_COMMONLIB_H | |
| #define J_COMMONLIB_H | | #define J_COMMONLIB_H | |
| | | | |
|
| #include "jbitstream.h" | | | |
| #include "jcalendar.h" | | | |
| #include "jcharset.h" | | | |
| #include "jdate.h" | | | |
| #include "jdynamiclink.h" | | | |
| #include "jeventobject.h" | | | |
| #include "jexception.h" | | | |
| // #include "jgc.h" | | | |
| #include "jhtmlparser.h" | | | |
| #include "jinvalidargumentexception.h" | | | |
| #include "jillegalargumentexception.h" | | | |
| #include "jjson.h" | | | |
| #include "jlistener.h" | | | |
| #include "jnullpointerexception.h" | | | |
| #include "jobject.h" | | | |
| #include "jobservable.h" | | | |
| #include "jobserver.h" | | | |
| #include "joptions.h" | | | |
| #include "joutofboundsexception.h" | | | |
| #include "jpointer.h" | | | |
| #include "jpolicies.h" | | | |
| #include "jproperties.h" | | | |
| // #include "jregexp.h" | | | |
| #include "jruntimeexception.h" | | | |
| #include "jstringtokenizer.h" | | | |
| #include "jstringutils.h" | | | |
| #include "jsystem.h" | | | |
| #include "jtypes.h" | | | |
| #include "junit.h" | | | |
| #include "jurl.h" | | | |
| #include "jxmlparser.h" | | | |
| | | | |
| #ifdef _WIN32 | | | |
| #else | | | |
| #include "jhttp.h" | | | |
| #endif | | | |
| | | | |
| #define JINFO 1 | | | |
| #define JWARN 2 | | | |
| #define JERRO 3 | | | |
| | | | |
| #ifdef JDEBUG_ENABLED | | | |
| | | | |
| #define JDEBUG(t, args...) | | | |
| | | | |
| | | | |
| | | | |
| \ | | | |
| if (t == JINFO) { | | | |
| | | | |
| | | | |
| | | | |
| \ | | | |
| printf ("\033[37;40mINFO:: %s:%d [%s] \033[37;40m", __FILE__ | | | |
| , __LINE__, __PRETTY_FUNCTION__); \ | | | |
| } else if (t == JWARN) { | | | |
| | | | |
| | | | |
| | | | |
| \ | | | |
| printf ("\033[33;40mWARN:: %s:%d [%s] \033[37;40m", __FILE__ | | | |
| , __LINE__, __PRETTY_FUNCTION__); \ | | | |
| } else if (t == JERRO) { | | | |
| | | | |
| | | | |
| | | | |
| \ | | | |
| printf ("\033[31;40mERRO:: %s:%d [%s] \033[37;40m", __FILE__ | | | |
| , __LINE__, __PRETTY_FUNCTION__); \ | | | |
| } | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| \ | | | |
| printf(args); | | | |
| | | | |
| | | | |
| | | | |
| \ | | | |
| fflush(stdin); | | | |
| | | | |
| | | | |
| | | | |
| \ | | | |
| | | | |
| #else | | | |
| | | | |
| #define JDEBUG(...) while (0) {} | | | |
| | | | |
| | | | |
| \ | | | |
| | | | |
| #endif | | | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 95 lines changed or deleted | | 0 lines changed or added | |
|
| jconnection.h | | jconnection.h | |
| | | | |
| skipping to change at line 64 | | skipping to change at line 64 | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class Connection : public virtual jcommon::Object{ | | class Connection : public virtual jcommon::Object{ | |
| | | | |
| friend class DatagramSocket; | | friend class DatagramSocket; | |
| friend class Socket; | | friend class Socket; | |
| friend class RTPSocket; | | friend class RTPSocket; | |
| friend class MulticastSocket; | | friend class MulticastSocket; | |
| friend class RawSocket; | | friend class RawSocket; | |
| | | | |
|
| protected: | | protected: | |
| /** \brief */ | | /** \brief */ | |
| jconnection_type_t _type; | | jconnection_type_t _type; | |
| /** \brief */ | | /** \brief */ | |
| bool _is_closed; | | bool _is_closed; | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| Connection(jconnection_type_t type); | | Connection(jconnection_type_t type); | |
| | | | |
|
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jconnection_type_t GetType(); | | virtual jconnection_type_t GetType(); | |
| | | | |
|
| /** | | /** | |
| * \brief Send bytes to a destination. | | * \brief Send bytes to a destination. | |
| * | | * | |
| */ | | */ | |
| virtual bool IsClosed(); | | virtual bool IsClosed(); | |
| | | | |
|
| /** | | /** | |
| * \brief Send bytes to a destination. | | * \brief Send bytes to a destination. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *b_, int size_, bool block_ = true) = 0 | | virtual int Send(const char *b_, int size_, bool block_ = true) = 0; | |
| ; | | | |
| | | | |
|
| /** | | /** | |
| * \brief Send bytes to a destination. | | * \brief Send bytes to a destination. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *b_, int size_, int time_) = 0; | | virtual int Send(const char *b_, int size_, int time_) = 0; | |
| | | | |
|
| /** | | /** | |
| * \brief Receive bytes from a source. | | * \brief Receive bytes from a source. | |
| * | | * | |
| * \return the number of bytes received, or 0 if the peer has | | * \return the number of bytes received, or 0 if the peer has shutdo | |
| shutdown. | | wn. | |
| * | | * | |
| * \exception SocketException an error occurred. | | * \exception SocketException an error occurred. | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int data_length_, bool block_ = tr | | virtual int Receive(char *data_, int data_length_, bool block_ = tru | |
| ue) = 0; | | e) = 0; | |
| | | | |
|
| /** | | /** | |
| * \brief Receive bytes from a source. | | * \brief Receive bytes from a source. | |
| * | | * | |
| * \return the number of bytes received, or 0 if the peer has | | * \return the number of bytes received, or 0 if the peer has shutdo | |
| shutdown. | | wn. | |
| * | | * | |
| * \exception SocketException an error occurred. | | * \exception SocketException an error occurred. | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int data_length_, int time_) = 0; | | virtual int Receive(char *data_, int data_length_, int time_) = 0; | |
| | | | |
|
| /** | | /** | |
| * \brief Close the socket. | | * \brief Close the socket. | |
| * | | * | |
| */ | | */ | |
| virtual void Close() = 0; | | virtual void Close() = 0; | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| virtual SOCKET GetHandler() = 0; | | virtual SOCKET GetHandler() = 0; | |
| #else | | #else | |
| virtual int GetHandler() = 0; | | virtual int GetHandler() = 0; | |
| #endif | | #endif | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::InputStream * GetInputStream() = 0; | | virtual jio::InputStream * GetInputStream() = 0; | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::OutputStream * GetOutputStream() = 0; | | virtual jio::OutputStream * GetOutputStream() = 0; | |
| | | | |
|
| /** | | /** | |
| * \brief Get the bytes sent to a destination. | | * \brief Get the bytes sent to a destination. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetSentBytes() = 0; | | virtual int64_t GetSentBytes() = 0; | |
| | | | |
|
| /** | | /** | |
| * \brief Get de bytes received from a source. | | * \brief Get de bytes received from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetReceiveBytes() = 0; | | virtual int64_t GetReceiveBytes() = 0; | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 14 change blocks. |
| 82 lines changed or deleted | | 81 lines changed or added | |
|
| jfile.h | | jfile.h | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| #include <stdio.h> | | #include <stdio.h> | |
| #include <string.h> | | #include <string.h> | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| | | | |
| namespace jio { | | namespace jio { | |
| | | | |
| /** | | /** | |
| * \brief Tipo de arquivo. | | * \brief Tipo de arquivo. | |
| * | | * | |
| */ | | */ | |
|
| enum file_type_t { | | enum jfile_type_t { | |
| F_REGULAR, | | F_REGULAR, | |
| F_DIRECTORY, | | F_DIRECTORY, | |
| F_CHAR_DEVICE, | | F_CHAR_DEVICE, | |
| F_COMPRESS, | | F_COMPRESS, | |
| F_ENCRYPTED, | | F_ENCRYPTED, | |
| F_HIDDEN, | | F_HIDDEN, | |
| F_OFFLINE, | | F_OFFLINE, | |
| F_SYSTEM, | | F_SYSTEM, | |
| F_BLOCK_DEVICE, | | F_BLOCK_DEVICE, | |
| F_FIFO, | | F_FIFO, | |
| F_SYMBOLIC_LINK, | | F_SYMBOLIC_LINK, | |
| F_SOCKET, | | F_SOCKET, | |
| F_UNKNOWN | | F_UNKNOWN | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief Flags de arquivo. | | * \brief Flags de arquivo. | |
| * | | * | |
| */ | | */ | |
|
| enum file_flags_t { | | enum jfile_flags_t { | |
| F_WRITE_ONLY = 0x0001, | | F_WRITE_ONLY = 0x0001, | |
| F_READ_ONLY = 0x0002, | | F_READ_ONLY = 0x0002, | |
| F_READ_WRITE = 0x0004, | | F_READ_WRITE = 0x0004, | |
| F_EXCLUSIVE = 0x0008, | | F_EXCLUSIVE = 0x0008, | |
| F_TRUNCATE = 0x0010, | | F_TRUNCATE = 0x0010, | |
| F_APPEND = 0x0020, | | F_APPEND = 0x0020, | |
| F_NON_BLOCK = 0x0040, | | F_NON_BLOCK = 0x0040, | |
| F_SYNC = 0x0080, | | F_SYNC = 0x0080, | |
| F_NON_FOLLOW = 0x0100, | | F_NON_FOLLOW = 0x0100, | |
| F_DIR = 0x0200, | | F_DIR = 0x0200, | |
| | | | |
| skipping to change at line 105 | | skipping to change at line 105 | |
| /** \brief */ | | /** \brief */ | |
| int _fd; | | int _fd; | |
| /** \brief */ | | /** \brief */ | |
| DIR *_dir; | | DIR *_dir; | |
| #endif | | #endif | |
| /** \brief */ | | /** \brief */ | |
| std::string _filename; | | std::string _filename; | |
| /** \brief */ | | /** \brief */ | |
| struct stat _stat; | | struct stat _stat; | |
| /** \brief */ | | /** \brief */ | |
|
| file_type_t _type; | | jfile_type_t _type; | |
| /** \brief */ | | /** \brief */ | |
| bool _is_closed; | | bool _is_closed; | |
| /** \brief */ | | /** \brief */ | |
| bool _exists; | | bool _exists; | |
| | | | |
|
| | | private: | |
| /** | | /** | |
| * \brief Construtor. | | * \brief Construtor. | |
| * | | * | |
| */ | | */ | |
|
| File(std::string prefix, std::string sufix, bool scramble); | | File(std::string prefix, std::string sufix); | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief Create a new file. | | * \brief Create a new file. | |
| * | | * | |
| */ | | */ | |
| File(std::string filename_, int = F_READ_ONLY | F_LARGEFILE)
; | | File(std::string filename_, int = F_READ_ONLY | F_LARGEFILE)
; | |
| | | | |
| /** | | /** | |
| * \brief Create a new directory. | | * \brief Create a new directory. | |
| | | | |
| skipping to change at line 140 | | skipping to change at line 141 | |
| /** | | /** | |
| * \brief Destrutor virtual. | | * \brief Destrutor virtual. | |
| * | | * | |
| */ | | */ | |
| virtual ~File(); | | virtual ~File(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | static std::string GetDelimiter(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | static std::string ProcessPath(std::string pathname); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | static std::string NormalizePath(std::string pathname); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| static File * CreateTemporary(std::string prefix, std::strin
g sufix = std::string("")); | | static File * CreateTemporary(std::string prefix, std::strin
g sufix = std::string("")); | |
| | | | |
| /** | | /** | |
| * \brief Retorna o descritor para o arquivo. | | * \brief Retorna o descritor para o arquivo. | |
| * | | * | |
| */ | | */ | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| HANDLE GetFileDescriptor(); | | HANDLE GetFileDescriptor(); | |
| #else | | #else | |
| int GetFileDescriptor(); | | int GetFileDescriptor(); | |
| | | | |
| skipping to change at line 162 | | skipping to change at line 181 | |
| /** | | /** | |
| * \brief Retorna o tipo do arquivo. | | * \brief Retorna o tipo do arquivo. | |
| * | | * | |
| */ | | */ | |
| bool Exists(); | | bool Exists(); | |
| | | | |
| /** | | /** | |
| * \brief Retorna o tipo do arquivo. | | * \brief Retorna o tipo do arquivo. | |
| * | | * | |
| */ | | */ | |
|
| file_type_t GetType(); | | jfile_type_t GetType(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| std::string GetDirectoryDelimiter(); | | std::string GetDirectoryDelimiter(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 222 | | skipping to change at line 241 | |
| /** | | /** | |
| * \brief Retorna caminho do arquivo/diretorio. | | * \brief Retorna caminho do arquivo/diretorio. | |
| * | | * | |
| */ | | */ | |
| std::string GetPath(); | | std::string GetPath(); | |
| | | | |
| /** | | /** | |
| * \brief Retorna o caminho absoluto do arquivo/diretorio. | | * \brief Retorna o caminho absoluto do arquivo/diretorio. | |
| * | | * | |
| */ | | */ | |
|
| | | std::string GetCanonicalPath(); | |
| | | | |
| | | /** | |
| | | * \brief Retorna o caminho absoluto do arquivo/diretorio. | |
| | | * | |
| | | */ | |
| std::string GetAbsolutePath(); | | std::string GetAbsolutePath(); | |
| | | | |
| /** | | /** | |
| * \brief Retorna a data do ultimo acesso do arquivo. | | * \brief Retorna a data do ultimo acesso do arquivo. | |
| * | | * | |
| */ | | */ | |
| time_t GetLastAccessTime(); | | time_t GetLastAccessTime(); | |
| | | | |
| /** | | /** | |
| * \brief Retorna a data da ultima modificacao do arquivo. | | * \brief Retorna a data da ultima modificacao do arquivo. | |
| | | | |
End of changes. 8 change blocks. |
| 5 lines changed or deleted | | 30 lines changed or added | |
|
| jgfxhandler.h | | jgfxhandler.h | |
| | | | |
| skipping to change at line 26 | | skipping to change at line 26 | |
| * along with this program; if not, write to the
* | | * along with this program; if not, write to the
* | |
| * Free Software Foundation, Inc.,
* | | * Free Software Foundation, Inc.,
* | |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | |
| **************************************************************************
*/ | | **************************************************************************
*/ | |
| #ifndef J_GFXHANDLER_H | | #ifndef J_GFXHANDLER_H | |
| #define J_GFXHANDLER_H | | #define J_GFXHANDLER_H | |
| | | | |
| #include "jobject.h" | | #include "jobject.h" | |
| #include "jmutex.h" | | #include "jmutex.h" | |
| #include "jgraphics.h" | | #include "jgraphics.h" | |
|
| | | #include "joffscreenimage.h" | |
| | | | |
| #include <vector> | | #include <vector> | |
| #include <map> | | #include <map> | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| #include <directfb.h> | | #include <directfb.h> | |
| #endif | | #endif | |
| | | | |
| #define JGUI_MAX_FONTS 30 | | #define JGUI_MAX_FONTS 30 | |
| | | | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 58 | |
| SIZEWE_CURSOR, | | SIZEWE_CURSOR, | |
| SIZENWSE_CURSOR, | | SIZENWSE_CURSOR, | |
| SIZENESW_CURSOR, | | SIZENESW_CURSOR, | |
| WAIT_CURSOR | | WAIT_CURSOR | |
| }; | | }; | |
| | | | |
| class Window; | | class Window; | |
| class WindowManager; | | class WindowManager; | |
| class Font; | | class Font; | |
| class OffScreenImage; | | class OffScreenImage; | |
|
| | | class InputManager; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class GFXHandler : public virtual jcommon::Object{ | | class GFXHandler : public virtual jcommon::Object{ | |
| | | | |
| friend class Window; | | friend class Window; | |
| friend class WindowManager; | | friend class WindowManager; | |
| friend class Font; | | friend class Font; | |
| friend class OffScreenImage; | | friend class OffScreenImage; | |
|
| | | friend class InputManager; | |
| | | | |
| private: | | private: | |
| static GFXHandler * _instance; | | static GFXHandler * _instance; | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| IDirectFB *_dfb; | | IDirectFB *_dfb; | |
| IDirectFBDisplayLayer *_layer; | | IDirectFBDisplayLayer *_layer; | |
| | | | |
| struct cursor_params_t { | | struct cursor_params_t { | |
| OffScreenImage *cursor; | | OffScreenImage *cursor; | |
| | | | |
| skipping to change at line 154 | | skipping to change at line 157 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| IDirectFBDisplayLayer * GetDisplayLayer(); | | IDirectFBDisplayLayer * GetDisplayLayer(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | int CreateFont(std::string name, int height, IDirectFBFont * | |
| | | *font, int scale_width = DEFAULT_SCALE_WIDTH, int scale_height = DEFAULT_SC | |
| | | ALE_HEIGHT); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | int CreateFont(std::string name, int height, IDirectFBFont * | |
| | | *font, DFBFontDescription font_desc, int scale_width = DEFAULT_SCALE_WIDTH, | |
| | | int scale_height = DEFAULT_SCALE_HEIGHT); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | int CreateSurface(int widthp, int heightp, IDirectFBSurface | |
| | | **surface, jsurface_pixelformat_t pixelformat, int scale_width, int scale_h | |
| | | eight); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | int CreateSurface(int widthp, int heightp, IDirectFBSurface | |
| | | **surface, DFBSurfaceDescription surface_desc, int scale_width, int scale_h | |
| | | eight); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| int CreateWindow(int x, int y, int width, int height, IDirec
tFBWindow **window, IDirectFBSurface **surface, int opacity = 0xff, int sca
le_width = DEFAULT_SCALE_WIDTH, int scale_height = DEFAULT_SCALE_HEIGHT); | | int CreateWindow(int x, int y, int width, int height, IDirec
tFBWindow **window, IDirectFBSurface **surface, int opacity = 0xff, int sca
le_width = DEFAULT_SCALE_WIDTH, int scale_height = DEFAULT_SCALE_HEIGHT); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| void CreateFont(std::string name, int height, IDirectFBFont
**font, int scale_width = DEFAULT_SCALE_WIDTH, int scale_height = DEFAULT_S
CALE_HEIGHT); | | int CreateWindow(int x, int y, int width, int height, IDirec
tFBWindow **window, IDirectFBSurface **surface, DFBWindowDescription window
_desc, int opacity = 0xff, int scale_width = DEFAULT_SCALE_WIDTH, int scale
_height = DEFAULT_SCALE_HEIGHT); | |
| #endif | | #endif | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual ~GFXHandler(); | | virtual ~GFXHandler(); | |
| | | | |
| /** | | /** | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 36 lines changed or added | |
|
| jgraphics.h | | jgraphics.h | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| namespace jgui{ | | namespace jgui{ | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| enum jporter_duff_flags_t { | | enum jporter_duff_flags_t { | |
| PDF_NONE = 0x0001, // fs: sa fd: 1.0-sa
(defaults) | | PDF_NONE = 0x0001, // fs: sa fd: 1.0-sa
(defaults) | |
| PDF_CLEAR = 0x0002, // fs: 0.0 fd: 0.0 | | PDF_CLEAR = 0x0002, // fs: 0.0 fd: 0.0 | |
| PDF_SRC = 0x0004, // fs: 1.0 fd: 0.0 | | PDF_SRC = 0x0004, // fs: 1.0 fd: 0.0 | |
|
| PDF_SRC_OVER = 0x0008, // fs: 1.0 fd: 1.0-sa | | PDF_DST = 0x0008, // fs: 1.0 fd: 0.0 | |
| PDF_DST_OVER = 0x0010, // fs: 1.0-da fd: 1.0 | | PDF_SRC_OVER = 0x0010, // fs: 1.0 fd: 1.0-sa | |
| PDF_SRC_IN = 0x0020, // fs: da fd: 0.0 | | PDF_DST_OVER = 0x0020, // fs: 1.0-da fd: 1.0 | |
| PDF_DST_IN = 0x0040, // fs: 0.0 fd: sa | | PDF_SRC_IN = 0x0040, // fs: da fd: 0.0 | |
| PDF_SRC_OUT = 0x0080, // fs: 1.0-da fd: 0.0 | | PDF_DST_IN = 0x0080, // fs: 0.0 fd: sa | |
| PDF_DST_OUT = 0x0100, // fs: 0.0 fd: 1.0-sa | | PDF_SRC_OUT = 0x0100, // fs: 1.0-da fd: 0.0 | |
| PDF_SRC_ATOP = 0x0200, // fs: da fd: 1.0-sa | | PDF_DST_OUT = 0x0200, // fs: 0.0 fd: 1.0-sa | |
| PDF_DST_ATOP = 0x0400, // fs: 1.0-da fd: sa | | PDF_SRC_ATOP = 0x0400, // fs: da fd: 1.0-sa | |
| PDF_ADD = 0x0800, // fs: 1.0 fd: 1.0 | | PDF_DST_ATOP = 0x0800, // fs: 1.0-da fd: sa | |
| PDF_XOR = 0x1000 // fs: 1.0-da fd: 1. | | PDF_ADD = 0x1000, // fs: 1.0 fd: 1.0 | |
| 0-sa | | PDF_XOR = 0x2000 // fs: 1.0-da fd: 1. | |
| | | 0-sa | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| enum jdrawing_flags_t { | | enum jdrawing_flags_t { | |
| DF_NOFX = 0x01, | | DF_NOFX = 0x01, | |
| DF_BLEND = 0x02, | | DF_BLEND = 0x02, | |
| DF_XOR = 0x04 | | DF_XOR = 0x04 | |
| | | | |
| skipping to change at line 97 | | skipping to change at line 98 | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| enum jblitting_flags_t { | | enum jblitting_flags_t { | |
| BF_NOFX = 0x01, | | BF_NOFX = 0x01, | |
| BF_ALPHACHANNEL = 0x02, | | BF_ALPHACHANNEL = 0x02, | |
| BF_COLORALPHA = 0x04, | | BF_COLORALPHA = 0x04, | |
| BF_COLORIZE = 0x08, | | BF_COLORIZE = 0x08, | |
|
| BF_DEINTERLACE = 0x10, | | | |
| BF_SRC_COLORKEY = 0x20, | | | |
| BF_DST_COLORKEY = 0x40, | | | |
| BF_XOR = 0x80 | | BF_XOR = 0x80 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| enum jhorizontal_align_t { | | enum jhorizontal_align_t { | |
| LEFT_HALIGN, | | LEFT_HALIGN, | |
| CENTER_HALIGN, | | CENTER_HALIGN, | |
| | | | |
| skipping to change at line 240 | | skipping to change at line 238 | |
| */ | | */ | |
| class Graphics : public virtual jcommon::Object{ | | class Graphics : public virtual jcommon::Object{ | |
| | | | |
| friend class Window; | | friend class Window; | |
| friend class OffScreenImage; | | friend class OffScreenImage; | |
| | | | |
| protected: | | protected: | |
| Graphics(void *s); | | Graphics(void *s); | |
| | | | |
| private: | | private: | |
|
| struct edge_t { | | | |
| int yUpper; | | | |
| double xIntersect; | | | |
| double dxPerScan; | | | |
| struct edge_t *next; | | | |
| }; | | | |
| | | | |
| private: | | | |
| jthread::Mutex graphics_mutex; | | jthread::Mutex graphics_mutex; | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| IDirectFBSurface *surface; | | IDirectFBSurface *surface; | |
| #endif | | #endif | |
| | | | |
| struct jregion_t _clip; | | struct jregion_t _clip; | |
| struct jpoint_t _translate; | | struct jpoint_t _translate; | |
| struct jsize_t _screen; | | struct jsize_t _screen; | |
| struct jsize_t _scale; | | struct jsize_t _scale; | |
| struct jcolor_t _color; | | struct jcolor_t _color; | |
| jline_type_t _line_type; | | jline_type_t _line_type; | |
| jline_style_t _line_style; | | jline_style_t _line_style; | |
| jdrawing_flags_t _draw_flags; | | jdrawing_flags_t _draw_flags; | |
| jblitting_flags_t _blit_flags; | | jblitting_flags_t _blit_flags; | |
| jporter_duff_flags_t _porter_duff_flags; | | jporter_duff_flags_t _porter_duff_flags; | |
| Font *_font; | | Font *_font; | |
| double _radians; | | double _radians; | |
| int _line_width; | | int _line_width; | |
| | | | |
|
| // INFO:: polygon functions | | #ifdef DIRECTFB_UI | |
| | | struct edge_t { | |
| | | int yUpper; | |
| | | double xIntersect; | |
| | | double dxPerScan; | |
| | | struct edge_t *next; | |
| | | }; | |
| | | | |
| void insertEdge(edge_t *list, edge_t *edge); | | void insertEdge(edge_t *list, edge_t *edge); | |
| void makeEdgeRec(struct jpoint_t lower, struct jpoint_t uppe
r, int yComp, edge_t *edge, edge_t *edges[]); | | void makeEdgeRec(struct jpoint_t lower, struct jpoint_t uppe
r, int yComp, edge_t *edge, edge_t *edges[]); | |
| void fillScan(int scan, edge_t *active); | | void fillScan(int scan, edge_t *active); | |
| int yNext(int k, int cnt, jpoint_t pts[]); | | int yNext(int k, int cnt, jpoint_t pts[]); | |
| void buildEdgeList(int cnt, jpoint_t pts[], edge_t *edges[])
; | | void buildEdgeList(int cnt, jpoint_t pts[], edge_t *edges[])
; | |
| void updateActiveList(int scan, edge_t *active); | | void updateActiveList(int scan, edge_t *active); | |
| void Polygon(int n, int coordinates[]); | | void Polygon(int n, int coordinates[]); | |
| void Fill_polygon(int n, int ppts[]); | | void Fill_polygon(int n, int ppts[]); | |
| | | | |
|
| // INFO:: render rotated images | | DFBSurfaceBlittingFlags GetBlittingFlags(jblitting_flags_t t | |
| void RotateImage(OffScreenImage *img, int xc, int yc, int x, | | ); | |
| int y, int width, int height, double angle); | | #endif | |
| | | | |
| | | void RotateImage(OffScreenImage *img, int xc, int yc, int x, | |
| | | int y, int width, int height, double angle, uint8_t alpha); | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual ~Graphics(); | | virtual ~Graphics(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 424 | | skipping to change at line 423 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual Font * GetFont(); | | virtual Font * GetFont(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual jporter_duff_flags_t GetPorterDuffFlags(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual jdrawing_flags_t GetDrawingFlags(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual jblitting_flags_t GetBlittingFlags(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual void SetPorterDuffFlags(jporter_duff_flags_t t); | | virtual void SetPorterDuffFlags(jporter_duff_flags_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetDrawingFlags(jdrawing_flags_t t); | | virtual void SetDrawingFlags(jdrawing_flags_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
End of changes. 6 change blocks. |
| 26 lines changed or deleted | | 44 lines changed or added | |
|
| jguilib.h | | jguilib.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * GNU General Public License for more details.
* | | * GNU General Public License for more details.
* | |
| *
* | | *
* | |
| * You should have received a copy of the GNU General Public License
* | | * You should have received a copy of the GNU General Public License
* | |
| * along with this program; if not, write to the
* | | * along with this program; if not, write to the
* | |
| * Free Software Foundation, Inc.,
* | | * Free Software Foundation, Inc.,
* | |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | |
| **************************************************************************
*/ | | **************************************************************************
*/ | |
| #ifndef J_GUILIB_H | | #ifndef J_GUILIB_H | |
| #define J_GUILIB_H | | #define J_GUILIB_H | |
| | | | |
|
| #include "jadjustmentevent.h" | | | |
| #include "jadjustmentlistener.h" | | | |
| #include "janimation.h" | | | |
| #include "jborderlayout.h" | | | |
| #include "jbutton.h" | | | |
| #include "jbuttonevent.h" | | | |
| #include "jbuttonlistener.h" | | | |
| #include "jcalendardialogbox.h" | | | |
| #include "jcalendarevent.h" | | | |
| #include "jcalendarlistener.h" | | | |
| #include "jcanvas.h" | | | |
| #include "jcardlayout.h" | | | |
| #include "jcheckbutton.h" | | | |
| #include "jcheckbuttonevent.h" | | | |
| #include "jcheckbuttongroup.h" | | | |
| #include "jcheckbuttonlistener.h" | | | |
| #include "jcombobox.h" | | | |
| #include "jcomponent.h" | | | |
| #include "jcomponentevent.h" | | | |
| #include "jcomponentlistener.h" | | | |
| #include "jcontainer.h" | | | |
| #include "jcontainerevent.h" | | | |
| #include "jcontainerlistener.h" | | | |
| #include "jcoordinatelayout.h" | | | |
| #include "jfilechooserdialogbox.h" | | | |
| #include "jflowlayout.h" | | | |
| #include "jfocusevent.h" | | | |
| #include "jfocuslistener.h" | | | |
| #include "jfont.h" | | | |
| #include "jframe.h" | | | |
| #include "jframeinputlistener.h" | | | |
| #include "jgfxhandler.h" | | | |
| #include "jgraphics.h" | | | |
| #include "jgridbaglayout.h" | | | |
| #include "jgridlayout.h" | | | |
| #include "jicon.h" | | | |
| #include "jimagebutton.h" | | | |
| #include "jinputdialogbox.h" | | | |
| #include "jinputmanager.h" | | | |
| #include "jitemcomponent.h" | | | |
| #include "jkeyboard.h" | | | |
| #include "jkeyboardevent.h" | | | |
| #include "jkeyboardlistener.h" | | | |
| #include "jkeyevent.h" | | | |
| #include "jkeylistener.h" | | | |
| #include "jlabel.h" | | | |
| #include "jlayout.h" | | | |
| #include "jlistbox.h" | | | |
| #include "jmarquee.h" | | | |
| #include "jmenu.h" | | | |
| #include "jmenugroup.h" | | | |
| #include "jmessagedialogbox.h" | | | |
| #include "jmouseevent.h" | | | |
| #include "jmouselistener.h" | | | |
| #include "jnullgraphics.h" | | | |
| #include "jnulllayout.h" | | | |
| #include "joffscreenimage.h" | | | |
| #include "jpanel.h" | | | |
| #include "jprogressbar.h" | | | |
| #include "jscrollbar.h" | | | |
| #include "jscrollpane.h" | | | |
| #include "jselectevent.h" | | | |
| #include "jselectlistener.h" | | | |
| #include "jslider.h" | | | |
| #include "jspin.h" | | | |
| #include "jtable.h" | | | |
| #include "jtextarea.h" | | | |
| #include "jtextcomponent.h" | | | |
| #include "jtextdialogbox.h" | | | |
| #include "jtextevent.h" | | | |
| #include "jtextfield.h" | | | |
| #include "jtextlistener.h" | | | |
| #include "jtheme.h" | | | |
| #include "jthemeevent.h" | | | |
| #include "jthemelistener.h" | | | |
| #include "jthememanager.h" | | | |
| #include "jtooglebutton.h" | | | |
| #include "jtree.h" | | | |
| #include "jwatch.h" | | | |
| #include "jwindow.h" | | | |
| #include "jwindowevent.h" | | | |
| #include "jwindowlistener.h" | | | |
| #include "jwindowmanager.h" | | | |
| #include "jyesnodialogbox.h" | | | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 85 lines changed or deleted | | 0 lines changed or added | |
|
| jinputmanager.h | | jinputmanager.h | |
| | | | |
| skipping to change at line 29 | | skipping to change at line 29 | |
| **************************************************************************
*/ | | **************************************************************************
*/ | |
| #ifndef J_INPUTMANAGER_H | | #ifndef J_INPUTMANAGER_H | |
| #define J_INPUTMANAGER_H | | #define J_INPUTMANAGER_H | |
| | | | |
| #include "jcomponent.h" | | #include "jcomponent.h" | |
| #include "jkeylistener.h" | | #include "jkeylistener.h" | |
| #include "jmouselistener.h" | | #include "jmouselistener.h" | |
| #include "jthread.h" | | #include "jthread.h" | |
| #include "jmutex.h" | | #include "jmutex.h" | |
| #include "jautolock.h" | | #include "jautolock.h" | |
|
| | | #include "jcondition.h" | |
| | | | |
| #include <vector> | | #include <vector> | |
| #include <map> | | #include <map> | |
| #include <list> | | #include <list> | |
| | | | |
| namespace jgui { | | namespace jgui { | |
| | | | |
|
| | | enum jbroadcaster_event_t { | |
| | | JBROADCAST_UNKNOWN = 0x00, | |
| | | JBROADCAST_KEYEVENT = 0x01, | |
| | | JBROADCAST_MOUSEEVENT = 0x02 | |
| | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
|
| class KeyProcess : public jthread::Thread{ | | class EventBroadcaster : public jthread::Thread { | |
| | | | |
| private: | | private: | |
|
| KeyListener *_listener; | | std::vector<jcommon::EventObject *> _events; | |
| KeyEvent *_event; | | jcommon::Listener *_listener; | |
| | | jthread::Condition _sem; | |
| | | jthread::Mutex _mutex; | |
| | | jbroadcaster_event_t _type; | |
| | | bool _running; | |
| | | | |
| public: | | public: | |
|
| KeyProcess(): | | EventBroadcaster(jcommon::Listener *listener); | |
| jthread::Thread(jthread::DETACH_THREAD) | | | |
| { | | | |
| } | | | |
| | | | |
| virtual ~KeyProcess() | | | |
| { | | | |
| _event = NULL; | | | |
| } | | | |
| | | | |
| static void ProcessEvent(KeyListener *listener, KeyEvent *ev | | | |
| ent) | | | |
| { | | | |
| listener->KeyPressed(event); | | | |
| | | | |
| delete event; | | | |
| } | | | |
| | | | |
| virtual void SetListener(KeyListener *listener, KeyEvent *ev | | | |
| ent) | | | |
| { | | | |
| _listener = listener; | | | |
| _event = event; | | | |
| } | | | |
| | | | |
| virtual void Run() | | | |
| { | | | |
| KeyProcess::ProcessEvent(_listener, _event); | | | |
| } | | | |
| | | | |
| }; | | | |
| | | | |
| class MouseProcess : public jthread::Thread{ | | | |
| | | | |
| private: | | | |
| MouseListener *_listener; | | | |
| MouseEvent *_event; | | | |
| | | | |
|
| public: | | virtual ~EventBroadcaster(); | |
| MouseProcess(): | | | |
| jthread::Thread(jthread::DETACH_THREAD) | | | |
| { | | | |
| } | | | |
| | | | |
|
| virtual ~MouseProcess() | | jcommon::Listener * GetListener(); | |
| { | | | |
| _event = NULL; | | | |
| } | | | |
| | | | |
|
| static void ProcessEvent(MouseListener *listener, MouseEvent | | void SetBroadcastEvent(jbroadcaster_event_t t); | |
| *event) | | jbroadcaster_event_t GetBroadcastEvent(); | |
| { | | | |
| if (event->GetType() == JMOUSE_CLICKED_EVENT) { | | | |
| listener->MouseClicked(event); | | | |
| } else if (event->GetType() == JMOUSE_PRESSED_EVENT) | | | |
| { | | | |
| listener->MousePressed(event); | | | |
| } else if (event->GetType() == JMOUSE_RELEASED_EVENT | | | |
| ) { | | | |
| listener->MouseReleased(event); | | | |
| } else if (event->GetType() == JMOUSE_MOVED_EVENT) { | | | |
| listener->MouseMoved(event); | | | |
| } else if (event->GetType() == JMOUSE_WHEEL_EVENT) { | | | |
| listener->MouseWheel(event); | | | |
| } | | | |
| | | | |
|
| delete event; | | void Add(jcommon::EventObject *event, int limit = 0); | |
| } | | | |
| | | | |
|
| virtual void SetListener(MouseListener *listener, MouseEvent | | void Reset(); | |
| *event) | | void Release(); | |
| { | | | |
| _listener = listener; | | | |
| _event = event; | | | |
| } | | | |
| | | | |
|
| virtual void Run() | | virtual void Run(); | |
| { | | | |
| MouseProcess::ProcessEvent(_listener, _event); | | | |
| } | | | |
| | | | |
| }; | | }; | |
| | | | |
| class InputManager : public jthread::Thread{ | | class InputManager : public jthread::Thread{ | |
| | | | |
|
| | | friend class GFXHandler; | |
| | | | |
| private: | | private: | |
| static InputManager *instance; | | static InputManager *instance; | |
| | | | |
| jthread::Mutex _mutex; | | jthread::Mutex _mutex; | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| IDirectFBEventBuffer *events; | | IDirectFBEventBuffer *events; | |
| #endif | | #endif | |
| | | | |
|
| std::vector<MouseListener *> _mouse_listeners; | | std::vector<EventBroadcaster *> _broadcasters; | |
| std::map<MouseListener *, MouseProcess *> _mouse_processors; | | int _initialized, | |
| std::vector<KeyListener *> _key_listeners; | | _screen_width, | |
| std::map<KeyListener *, KeyProcess *> _key_processors; | | _screen_height, | |
| int _state, | | _scale_width, | |
| _screen_width, | | _scale_height; | |
| _screen_height, | | | |
| _scale_width, | | | |
| _scale_height; | | | |
| int _mouse_x, | | int _mouse_x, | |
|
| _mouse_y; | | _mouse_y; | |
| bool _is_key_enabled, | | bool _is_key_enabled, | |
| _is_mouse_enabled, | | _is_mouse_enabled, | |
|
| _skip_key_events, | | _skip_key_events, | |
| _skip_mouse_events; | | _skip_mouse_events; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| InputManager(); | | InputManager(); | |
| | | | |
|
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | void Init(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | void Restore(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | void Release(); | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| int TranslateToDFBKeyCode(int code); | | int TranslateToDFBKeyCode(int code); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 273 | | skipping to change at line 242 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void RemoveKeyListener(KeyListener *listener); | | virtual void RemoveKeyListener(KeyListener *listener); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DispatchKeyEvent(KeyEvent *event); | | | |
| | | | |
| /** | | | |
| * \brief | | | |
| * | | | |
| */ | | | |
| virtual std::vector<KeyListener *> & GetKeyListeners(); | | | |
| | | | |
| /** | | | |
| * \brief | | | |
| * | | | |
| */ | | | |
| virtual void RegisterMouseListener(MouseListener *listener); | | virtual void RegisterMouseListener(MouseListener *listener); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void RemoveMouseListener(MouseListener *listener); | | virtual void RemoveMouseListener(MouseListener *listener); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DispatchMouseEvent(MouseEvent *event); | | virtual void DispatchEvent(jcommon::EventObject *event); | |
| | | | |
| /** | | | |
| * \brief | | | |
| * | | | |
| */ | | | |
| virtual std::vector<MouseListener *> & GetMouseListeners(); | | | |
| | | | |
| /** | | | |
| * \brief | | | |
| * | | | |
| */ | | | |
| virtual void WaitEvents(); | | | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Run(); | | virtual void Run(); | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
End of changes. 18 change blocks. |
| 114 lines changed or deleted | | 53 lines changed or added | |
|
| jiolib.h | | jiolib.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * GNU General Public License for more details.
* | | * GNU General Public License for more details.
* | |
| *
* | | *
* | |
| * You should have received a copy of the GNU General Public License
* | | * You should have received a copy of the GNU General Public License
* | |
| * along with this program; if not, write to the
* | | * along with this program; if not, write to the
* | |
| * Free Software Foundation, Inc.,
* | | * Free Software Foundation, Inc.,
* | |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | |
| **************************************************************************
*/ | | **************************************************************************
*/ | |
| #ifndef J_IOLIB_H | | #ifndef J_IOLIB_H | |
| #define J_IOLIB_H | | #define J_IOLIB_H | |
| | | | |
|
| #include "jbitinputstream.h" | | | |
| #include "jbitoutputstream.h" | | | |
| #include "jbufferedreader.h" | | | |
| #include "jchannel.h" | | | |
| #include "jdatainputstream.h" | | | |
| #include "jdataoutputstream.h" | | | |
| #include "jfile.h" | | | |
| #include "jfileexception.h" | | | |
| #include "jfileinputstream.h" | | | |
| #include "jfileoutputstream.h" | | | |
| #include "jinputstream.h" | | | |
| #include "jioexception.h" | | | |
| #include "jmemoryinputstream.h" | | | |
| #include "jmemoryoutputstream.h" | | | |
| #include "jobjectinputstream.h" | | | |
| #include "jobjectoutputstream.h" | | | |
| #include "joutputstream.h" | | | |
| #include "jpipeexception.h" | | | |
| #include "jpipestream.h" | | | |
| #include "jprintstream.h" | | | |
| #include "jserializable.h" | | | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 22 lines changed or deleted | | 0 lines changed or added | |
|
| jmonitor.h | | jmonitor.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * GNU General Public License for more details.
* | | * GNU General Public License for more details.
* | |
| *
* | | *
* | |
| * You should have received a copy of the GNU General Public License
* | | * You should have received a copy of the GNU General Public License
* | |
| * along with this program; if not, write to the
* | | * along with this program; if not, write to the
* | |
| * Free Software Foundation, Inc.,
* | | * Free Software Foundation, Inc.,
* | |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | |
| **************************************************************************
*/ | | **************************************************************************
*/ | |
| #ifndef J_MONITOR_H | | #ifndef J_MONITOR_H | |
| #define J_MONITOR_H | | #define J_MONITOR_H | |
| | | | |
|
| #include "jthread.h" | | | |
| #include "jmutex.h" | | #include "jmutex.h" | |
|
| #include "jsemaphore.h" | | #include "jcondition.h" | |
| | | | |
| #include <map> | | #include <map> | |
| | | | |
| namespace jthread { | | namespace jthread { | |
| | | | |
| struct jmonitor_map_t { | | struct jmonitor_map_t { | |
| Condition sem; | | Condition sem; | |
| bool signalled; | | bool signalled; | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 62 | |
| std::map<HANDLE, jmonitor_map_t *> threadQ; | | std::map<HANDLE, jmonitor_map_t *> threadQ; | |
| #else | | #else | |
| std::map<pthread_t, jmonitor_map_t *> threadQ; | | std::map<pthread_t, jmonitor_map_t *> threadQ; | |
| #endif | | #endif | |
| | | | |
| protected: | | protected: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| Monitor(const Monitor&); | | // Monitor(const Monitor&); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| Monitor & operator=(const Monitor&); | | Monitor & operator=(const Monitor&); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void GrantMonitor(); | | void GrantMonitor(); | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief Creates a Monitor Object. | | * \brief Creates a Monitor Object. | |
| * | | * | |
| */ | | */ | |
|
| explicit Monitor(); | | Monitor(); | |
| | | | |
| /** | | /** | |
| * \brief Destroys a Monitor object. | | * \brief Destroys a Monitor object. | |
| * | | * | |
| */ | | */ | |
| virtual ~Monitor(); | | virtual ~Monitor(); | |
| | | | |
| /** | | /** | |
| * \brief Requests a lock on the Monitor object. Will block
if Lock is not available. | | * \brief Requests a lock on the Monitor object. Will block
if Lock is not available. | |
| * | | * | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 3 lines changed or added | |
|
| jsocketlib.h | | jsocketlib.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * GNU General Public License for more details.
* | | * GNU General Public License for more details.
* | |
| *
* | | *
* | |
| * You should have received a copy of the GNU General Public License
* | | * You should have received a copy of the GNU General Public License
* | |
| * along with this program; if not, write to the
* | | * along with this program; if not, write to the
* | |
| * Free Software Foundation, Inc.,
* | | * Free Software Foundation, Inc.,
* | |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* | |
| **************************************************************************
*/ | | **************************************************************************
*/ | |
| #ifndef J_SOCKLIB_H | | #ifndef J_SOCKLIB_H | |
| #define J_SOCKLIB_H | | #define J_SOCKLIB_H | |
| | | | |
|
| #include "jconnection.h" | | | |
| #include "jconnectionpipe.h" | | | |
| #include "jdatagramsocket.h" | | | |
| #include "jhttprequester.h" | | | |
| #include "jinetaddress.h" | | | |
| #include "jmulticastsocket.h" | | | |
| // #include "jrtpsocket.h" | | | |
| #include "jserversocket.h" | | | |
| #include "jsocket.h" | | | |
| #include "jsocketexception.h" | | | |
| #include "jsocketinputstream.h" | | | |
| #include "jsocketoption.h" | | | |
| #include "jsocketoptionexception.h" | | | |
| #include "jsocketoutputstream.h" | | | |
| #include "jsocketstreamexception.h" | | | |
| #include "jsockettimeoutexception.h" | | | |
| #include "junknownhostexception.h" | | | |
| | | | |
| #ifdef _WIN32 | | | |
| #else | | | |
| #include "jrawsocket.h" | | | |
| #include "jsslserversocket.h" | | | |
| #include "jsslsocket.h" | | | |
| #include "jsslsocketinputstream.h" | | | |
| #include "jsslsocketoutputstream.h" | | | |
| #endif | | | |
| | | | |
| void InitWindowsSocket(); | | void InitWindowsSocket(); | |
| void ReleaseWindowsSocket(); | | void ReleaseWindowsSocket(); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 27 lines changed or deleted | | 0 lines changed or added | |
|
| juuid.h | | juuid.h | |
| | | | |
| skipping to change at line 307 | | skipping to change at line 307 | |
| extern int uuid_is_nil (uuid_t *, int *); | | extern int uuid_is_nil (uuid_t *, int *); | |
| extern int uuid_compare (uuid_t *, uuid_t *, int *); | | extern int uuid_compare (uuid_t *, uuid_t *, int *); | |
| extern int uuid_equal (uuid_t *, uuid_t *, int *); | | extern int uuid_equal (uuid_t *, uuid_t *, int *); | |
| extern void uuid_from_string (const char *, uuid_t *, int *); | | extern void uuid_from_string (const char *, uuid_t *, int *); | |
| extern void uuid_to_string (uuid_t *, char **, int *); | | extern void uuid_to_string (uuid_t *, char **, int *); | |
| extern unsigned int uuid_hash (uuid_t *, int *); | | extern unsigned int uuid_hash (uuid_t *, int *); | |
| | | | |
| struct prng_st; | | struct prng_st; | |
| typedef struct prng_st prng_t; | | typedef struct prng_st prng_t; | |
| | | | |
|
| enum prng_rc_t { | | enum jprng_rc_t { | |
| PRNG_RC_OK = 0, | | PRNG_RC_OK = 0, | |
| PRNG_RC_ARG = 1, | | PRNG_RC_ARG = 1, | |
| PRNG_RC_MEM = 2, | | PRNG_RC_MEM = 2, | |
| PRNG_RC_INT = 3 | | PRNG_RC_INT = 3 | |
| }; | | }; | |
| | | | |
|
| extern prng_rc_t prng_create (prng_t **prng); | | extern jprng_rc_t prng_create (prng_t **prng); | |
| extern prng_rc_t prng_data (prng_t *prng, void *data_ptr, size_t data_l | | extern jprng_rc_t prng_data (prng_t *prng, void *data_ptr, size_t data_ | |
| en); | | len); | |
| extern prng_rc_t prng_destroy (prng_t *prng); | | extern jprng_rc_t prng_destroy (prng_t *prng); | |
| | | | |
| extern int str_vsnprintf (char *, size_t, const char *, va_list); | | extern int str_vsnprintf (char *, size_t, const char *, va_list); | |
| extern int str_snprintf (char *, size_t, const char *, ...); | | extern int str_snprintf (char *, size_t, const char *, ...); | |
| extern int str_vrsprintf (char **, const char *, va_list); | | extern int str_vrsprintf (char **, const char *, va_list); | |
| extern int str_rsprintf (char **, const char *, ...); | | extern int str_rsprintf (char **, const char *, ...); | |
| extern char *str_vasprintf ( const char *, va_list); | | extern char *str_vasprintf ( const char *, va_list); | |
| extern char *str_asprintf ( const char *, ...); | | extern char *str_asprintf ( const char *, ...); | |
| | | | |
| // uuid_vers.h -- Version Information for OSSP uuid (syntax: C/C++) [automa
tically generated and maintained by GNU shtool] | | // uuid_vers.h -- Version Information for OSSP uuid (syntax: C/C++) [automa
tically generated and maintained by GNU shtool] | |
| | | | |
| | | | |
| skipping to change at line 425 | | skipping to change at line 425 | |
| | | | |
| // OSSP uuid version (compile-time information) | | // OSSP uuid version (compile-time information) | |
| #define UUID_VERSION 0x106202 | | #define UUID_VERSION 0x106202 | |
| | | | |
| // encoding octet stream lengths | | // encoding octet stream lengths | |
| #define UUID_LEN_BIN (128 /*bit*/ / 8 /*bytes*/) | | #define UUID_LEN_BIN (128 /*bit*/ / 8 /*bytes*/) | |
| #define UUID_LEN_STR (128 /*bit*/ / 4 /*nibbles*/ + 4 /*hyphens*/) | | #define UUID_LEN_STR (128 /*bit*/ / 4 /*nibbles*/ + 4 /*hyphens*/) | |
| #define UUID_LEN_SIV (39 /*int(log(10,exp(2,128)-1)+1) digits*/) | | #define UUID_LEN_SIV (39 /*int(log(10,exp(2,128)-1)+1) digits*/) | |
| | | | |
| // API return codes | | // API return codes | |
|
| enum uuid_rc_t{ | | enum juuid_rc_t{ | |
| UUID_RC_OK = 0, // everything ok | | UUID_RC_OK = 0, // everything ok | |
| UUID_RC_ARG = 1, // invalid argument | | UUID_RC_ARG = 1, // invalid argument | |
| UUID_RC_MEM = 2, // out of memory | | UUID_RC_MEM = 2, // out of memory | |
| UUID_RC_SYS = 3, // system error | | UUID_RC_SYS = 3, // system error | |
| UUID_RC_INT = 4, // internal error | | UUID_RC_INT = 4, // internal error | |
| UUID_RC_IMP = 5 // not implemented | | UUID_RC_IMP = 5 // not implemented | |
| }; | | }; | |
| | | | |
| // UUID make modes | | // UUID make modes | |
| enum { | | enum { | |
| UUID_MAKE_V1 = (1 << 0), // DCE 1.1 v1 UUID | | UUID_MAKE_V1 = (1 << 0), // DCE 1.1 v1 UUID | |
| UUID_MAKE_V3 = (1 << 1), // DCE 1.1 v3 UUID | | UUID_MAKE_V3 = (1 << 1), // DCE 1.1 v3 UUID | |
| UUID_MAKE_V4 = (1 << 2), // DCE 1.1 v4 UUID | | UUID_MAKE_V4 = (1 << 2), // DCE 1.1 v4 UUID | |
| UUID_MAKE_V5 = (1 << 3), // DCE 1.1 v5 UUID | | UUID_MAKE_V5 = (1 << 3), // DCE 1.1 v5 UUID | |
| UUID_MAKE_MC = (1 << 4) // enforce multi-cast MAC address | | UUID_MAKE_MC = (1 << 4) // enforce multi-cast MAC address | |
| }; | | }; | |
| | | | |
| // UUID import/export formats | | // UUID import/export formats | |
|
| enum uuid_fmt_t { | | enum juuid_fmt_t { | |
| UUID_FMT_BIN = 0, // binary representation (import/export) | | UUID_FMT_BIN = 0, // binary representation (import/export) | |
| UUID_FMT_STR = 1, // string representation (import/export) | | UUID_FMT_STR = 1, // string representation (import/export) | |
| UUID_FMT_SIV = 2, // single integer value (import/export) | | UUID_FMT_SIV = 2, // single integer value (import/export) | |
| UUID_FMT_TXT = 3 // textual description (export only) | | UUID_FMT_TXT = 3 // textual description (export only) | |
| }; | | }; | |
| | | | |
| // UUID abstract data type | | // UUID abstract data type | |
| struct uuid_st; | | struct uuid_st; | |
| typedef struct uuid_st uuid_t; | | typedef struct uuid_st uuid_t; | |
| | | | |
| // UUID object handling | | // UUID object handling | |
|
| extern uuid_rc_t uuid_create ( uuid_t **_uuid); | | extern juuid_rc_t uuid_create ( uuid_t **_uuid); | |
| extern uuid_rc_t uuid_destroy ( uuid_t *_uuid); | | extern juuid_rc_t uuid_destroy ( uuid_t *_uuid); | |
| extern uuid_rc_t uuid_clone (const uuid_t *_uuid, uuid_t **_clone); | | extern juuid_rc_t uuid_clone (const uuid_t *_uuid, uuid_t **_clone) | |
| | | ; | |
| | | | |
| // UUID generation | | // UUID generation | |
|
| extern uuid_rc_t uuid_load ( uuid_t *_uuid, const char *_name | | extern juuid_rc_t uuid_load ( uuid_t *_uuid, const char *_nam | |
| ); | | e); | |
| extern uuid_rc_t uuid_make ( uuid_t *_uuid, unsigned int _mod | | extern juuid_rc_t uuid_make ( uuid_t *_uuid, unsigned int _mo | |
| e, ...); | | de, ...); | |
| | | | |
| // UUID comparison | | // UUID comparison | |
|
| extern uuid_rc_t uuid_isnil (const uuid_t *_uuid, | | extern juuid_rc_t uuid_isnil (const uuid_t *_uuid, | |
| int *_result); | | int *_result); | |
| extern uuid_rc_t uuid_compare (const uuid_t *_uuid, const uuid_t *_uu | | extern juuid_rc_t uuid_compare (const uuid_t *_uuid, const uuid_t *_u | |
| id2, int *_result); | | uid2, int *_result); | |
| | | | |
| // UUID import/export | | // UUID import/export | |
|
| extern uuid_rc_t uuid_import ( uuid_t *_uuid, uuid_fmt_t _fmt, | | extern juuid_rc_t uuid_import ( uuid_t *_uuid, juuid_fmt_t _fmt | |
| const void *_data_ptr, size_t _data_len); | | , const void *_data_ptr, size_t _data_len); | |
| extern uuid_rc_t uuid_export (const uuid_t *_uuid, uuid_fmt_t _fmt, | | extern juuid_rc_t uuid_export (const uuid_t *_uuid, juuid_fmt_t _fmt | |
| void *_data_ptr, size_t *_data_len); | | , void *_data_ptr, size_t *_data_len); | |
| | | | |
| // library utilities | | // library utilities | |
|
| extern std::string uuid_error (uuid_rc_t _rc); | | extern std::string uuid_error (juuid_rc_t _rc); | |
| extern unsigned long uuid_version (void); | | extern unsigned long uuid_version (void); | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 23 lines changed or deleted | | 24 lines changed or added | |
|