| jcomponent.h | | jcomponent.h | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 58 | |
| }; | | }; | |
| | | | |
| enum jcomponent_orientation_t { | | enum jcomponent_orientation_t { | |
| LEFT_TO_RIGHT_ORIENTATION, | | LEFT_TO_RIGHT_ORIENTATION, | |
| RIGHT_TO_LEFT_ORIENTATION, | | RIGHT_TO_LEFT_ORIENTATION, | |
| TOP_TO_BOTTOM_ORIENTATION, | | TOP_TO_BOTTOM_ORIENTATION, | |
| BOTTOM_TO_TOP_ORIENTATION, | | BOTTOM_TO_TOP_ORIENTATION, | |
| }; | | }; | |
| | | | |
| enum jcomponent_border_t { | | enum jcomponent_border_t { | |
|
| NONE_BORDER, | | EMPTY_BORDER, | |
| FLAT_BORDER, | | | |
| LINE_BORDER, | | LINE_BORDER, | |
|
| GRADIENT_BORDER, | | | |
| ROUND_BORDER, | | | |
| BEVEL_BORDER, | | BEVEL_BORDER, | |
|
| DOWN_BEVEL_BORDER, | | ROUND_BORDER, | |
| ETCHED_BORDER | | RAISED_GRADIENT_BORDER, | |
| | | LOWERED_GRADIENT_BORDER, | |
| | | RAISED_BEVEL_BORDER, | |
| | | LOWERED_BEVEL_BORDER, | |
| | | RAISED_ETCHED_BORDER, | |
| | | LOWERED_ETCHED_BORDER | |
| }; | | }; | |
| | | | |
| // component baseline resize behavior | | // component baseline resize behavior | |
| enum jcomponent_behavior_t { | | enum jcomponent_behavior_t { | |
| // Indicates the baseline remains fixed relative to the y-origin. T
hat is, <code>getBaseline</code> returns | | // Indicates the baseline remains fixed relative to the y-origin. T
hat is, <code>getBaseline</code> returns | |
| // the same value regardless of the height or width. For example, a
<code>JLabel</code> containing non-empty | | // the same value regardless of the height or width. For example, a
<code>JLabel</code> containing non-empty | |
| // text with a vertical alignment of <code>TOP</code> should have a
baseline type of <code>CONSTANT_ASCENT</code>. | | // text with a vertical alignment of <code>TOP</code> should have a
baseline type of <code>CONSTANT_ASCENT</code>. | |
| CB_CONSTANT_ASCENT, | | CB_CONSTANT_ASCENT, | |
| // Indicates the baseline remains fixed relative to the height and d
oes not change as the width is varied. That is, | | // Indicates the baseline remains fixed relative to the height and d
oes not change as the width is varied. That is, | |
| // for any height H the difference between H and <code>getBaseline(w
, H)</code> is the same. For example, a <code> | | // for any height H the difference between H and <code>getBaseline(w
, H)</code> is the same. For example, a <code> | |
| | | | |
| skipping to change at line 140 | | skipping to change at line 142 | |
| *_right, | | *_right, | |
| *_up, | | *_up, | |
| *_down; | | *_down; | |
| jgui::Container *_parent; | | jgui::Container *_parent; | |
| jgui::Font *_font; | | jgui::Font *_font; | |
| jpoint_t _location; | | jpoint_t _location; | |
| jsize_t _size, | | jsize_t _size, | |
| _preferred_size, | | _preferred_size, | |
| _minimum_size, | | _minimum_size, | |
| _maximum_size; | | _maximum_size; | |
|
| jcolor_t _bgcolor, | | Color _bgcolor, | |
| _fgcolor, | | _fgcolor, | |
| _focus_bgcolor, | | _focus_bgcolor, | |
| _focus_fgcolor, | | _focus_fgcolor, | |
| _border_color, | | _border_color, | |
| _focus_border_color; | | _focus_border_color; | |
| jcomponent_alignment_t _alignment_x, | | jcomponent_alignment_t _alignment_x, | |
|
_alignment_y; | |
_alignment_y; | |
| jcomponent_orientation_t _orientation; | | jcomponent_orientation_t _orientation; | |
| jcomponent_border_t _border; | | jcomponent_border_t _border; | |
| int _gradient_level, | | int _gradient_level, | |
| _vertical_gap, | | _vertical_gap, | |
| _horizontal_gap, | | _horizontal_gap, | |
| _border_size; | | _border_size; | |
| bool _has_focus, | | bool _has_focus, | |
| _is_visible, | | _is_visible, | |
| | | | |
| skipping to change at line 657 | | skipping to change at line 659 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetBorderFocusColor(int red, int green, int blu
e, int alpha); | | virtual void SetBorderFocusColor(int red, int green, int blu
e, int alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetBackgroundColor(jcolor_t color); | | virtual void SetBackgroundColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetForegroundColor(jcolor_t color); | | virtual void SetForegroundColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetBackgroundFocusColor(jcolor_t color); | | virtual void SetBackgroundFocusColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetForegroundFocusColor(jcolor_t color); | | virtual void SetForegroundFocusColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetBorderColor(jcolor_t color); | | virtual void SetBorderColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetBorderFocusColor(jcolor_t color); | | virtual void SetBorderFocusColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetBackgroundColor(); | | virtual Color & GetBackgroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetForegroundColor(); | | virtual Color & GetForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetBackgroundFocusColor(); | | virtual Color & GetBackgroundFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetForegroundFocusColor(); | | virtual Color & GetForegroundFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetBorderColor(); | | virtual Color & GetBorderColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetBorderFocusColor(); | | virtual Color & GetBorderFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetFocusable(bool b); | | virtual void SetFocusable(bool b); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
End of changes. 16 change blocks. |
| 24 lines changed or deleted | | 26 lines changed or added | |
|
| jdatagramsocket.h | | jdatagramsocket.h | |
| | | | |
| skipping to change at line 49 | | skipping to change at line 49 | |
| | | | |
| namespace jsocket { | | namespace jsocket { | |
| | | | |
| /** | | /** | |
| * \brief Socket UDP. | | * \brief Socket UDP. | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class DatagramSocket : public jsocket::Connection{ | | class DatagramSocket : public jsocket::Connection{ | |
| | | | |
|
| private: | | private: | |
| /** \brief Use to bind the socket in a free port. */ | | /** \brief Use to bind the socket in a free port. */ | |
| static int _used_port; | | static int _used_port; | |
| | | | |
|
| /** \brief Socket handler. */ | | /** \brief Socket handler. */ | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| SOCKET _fd; | | SOCKET _fd; | |
| #else | | #else | |
|
| int _fd; | | int _fd; | |
| #endif | | #endif | |
|
| /** \brief Local socket. */ | | /** \brief Local socket. */ | |
| sockaddr_in _lsock; | | sockaddr_in _lsock; | |
| /** \brief Server socket UDP. */ | | /** \brief Server socket UDP. */ | |
| sockaddr_in _server_sock; | | sockaddr_in _server_sock; | |
| /** \brief Local inetaddress. */ | | /** \brief Local inetaddress. */ | |
| InetAddress *_local; | | InetAddress *_local; | |
| /** \brief Remote inetaddress. */ | | /** \brief Remote inetaddress. */ | |
| InetAddress *_address; | | InetAddress *_address; | |
| /** \brief Input stream. */ | | /** \brief Input stream. */ | |
| SocketInputStream *_is; | | SocketInputStream *_is; | |
| /** \brief Output stream. */ | | /** \brief Output stream. */ | |
| SocketOutputStream *_os; | | SocketOutputStream *_os; | |
| /** \brief Bytes sent. */ | | /** \brief Bytes sent. */ | |
| int64_t _sent_bytes; | | int64_t _sent_bytes; | |
| /** \brief Bytes received. */ | | /** \brief Bytes received. */ | |
| int64_t _receive_bytes; | | int64_t _receive_bytes; | |
| /** \brief Connect or not ? */ | | /** \brief Connect or not ? */ | |
| bool _stream; | | bool _stream; | |
|
| /** \brief */ | | /** \brief */ | |
| int _timeout; | | int _timeout; | |
| | | | |
|
| /** | | /** | |
| * \brief Create a new socket. | | * \brief Create a new socket. | |
| * | | * | |
| */ | | */ | |
| void CreateSocket(); | | void CreateSocket(); | |
| | | | |
|
| /** | | /** | |
| * \brief Bind socket. | | * \brief Bind socket. | |
| * | | * | |
| */ | | */ | |
| void BindSocket(InetAddress *addr_, int local_port_); | | void BindSocket(InetAddress *addr_, int local_port_); | |
| | | | |
|
| /** | | /** | |
| * \brief Connect socket. | | * \brief Connect socket. | |
| * | | * | |
| */ | | */ | |
| void ConnectSocket(InetAddress *addr_, int port_); | | void ConnectSocket(InetAddress *addr_, int port_); | |
| | | | |
|
| /** | | /** | |
| * \brief Init the stream. | | * \brief Init the stream. | |
| * | | * | |
| */ | | */ | |
| void InitStream(int rbuf_, int wbuf_); | | void InitStream(int rbuf_, int wbuf_); | |
| | | | |
|
| public: | | public: | |
| /** | | /** | |
| * \brief Construtor UDP client. | | * \brief Construtor UDP client. | |
| * | | * | |
| */ | | */ | |
| DatagramSocket(std::string addr_, int port_, bool stream_ = false, | | DatagramSocket(std::string addr_, int port_, bool stream_ = | |
| int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); | | false, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Construtor UDP server. | | * \brief Construtor UDP server. | |
| * | | * | |
| */ | | */ | |
| DatagramSocket(int port_, bool stream_ = false, int timeout_ = 0, i | | DatagramSocket(int port_, bool stream_ = false, int timeout_ | |
| nt rbuf_ = 65535, int wbuf_ = 4096); | | = 0, int rbuf_ = 65535, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Destructor virtual. | | * \brief Destructor virtual. | |
| * | | * | |
| */ | | */ | |
| virtual ~DatagramSocket(); | | virtual ~DatagramSocket(); | |
| | | | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| virtual SOCKET GetHandler(); | | virtual SOCKET GetHandler(); | |
| #else | | #else | |
| virtual int GetHandler(); | | virtual int GetHandler(); | |
| #endif | | #endif | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::InputStream * GetInputStream(); | | virtual jio::InputStream * GetInputStream(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::OutputStream * GetOutputStream(); | | virtual jio::OutputStream * GetOutputStream(); | |
| | | | |
|
| /** | | /** | |
| * \brief Read data from a source. | | * \brief Read data from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int size_, bool block_ = true); | | virtual int Receive(char *data_, int size_, bool block_ = tr | |
| | | ue); | |
| | | | |
|
| /** | | /** | |
| * \brief Read data from a source. | | * \brief Read data from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int size_, int time_); | | virtual int Receive(char *data_, int size_, int time_); | |
| | | | |
|
| /** | | /** | |
| * \brief Write data to a source. | | * \brief Write data to a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *data_, int size_, bool block_ = true); | | virtual int Send(const char *data_, int size_, bool block_ = | |
| | | true); | |
| | | | |
|
| /** | | /** | |
| * \brief Write data to a source. | | * \brief Write data to a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *data_, int size_, int time_); | | virtual int Send(const char *data_, int size_, int time_); | |
| | | | |
|
| /** | | /** | |
| * \brief Close the socket. | | * \brief Close the socket. | |
| * | | * | |
| */ | | */ | |
| virtual void Close(); | | virtual void Close(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| sockaddr_in LocalAddress(); | | sockaddr_in LocalAddress(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| sockaddr_in RemoteAddress(); | | sockaddr_in RemoteAddress(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get InetAddress. | | * \brief Get InetAddress. | |
| * | | * | |
| */ | | */ | |
| InetAddress * GetInetAddress(); | | InetAddress * GetInetAddress(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get the local port. | | * \brief Get the local port. | |
| * | | * | |
| */ | | */ | |
| int GetLocalPort(); | | int GetLocalPort(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get port. | | * \brief Get port. | |
| * | | * | |
| */ | | */ | |
| int GetPort(); | | int GetPort(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get sent bytes to destination. | | * \brief Get sent bytes to destination. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetSentBytes(); | | virtual int64_t GetSentBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get received bytes from a source. | | * \brief Get received bytes from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetReceiveBytes(); | | virtual int64_t GetReceiveBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get a object SocketOption. | | * \brief Get a object SocketOption. | |
| * | | * | |
| */ | | */ | |
| SocketOption * GetSocketOption(); | | SocketOption * GetSocketOption(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| std::string what(); | | virtual std::string what(); | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 28 change blocks. |
| 141 lines changed or deleted | | 143 lines changed or added | |
|
| jgraphics.h | | jgraphics.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_GRAPHICS_H | | #ifndef J_GRAPHICS_H | |
| #define J_GRAPHICS_H | | #define J_GRAPHICS_H | |
| | | | |
|
| #include "jobject.h" | | #include "jcolor.h" | |
| #include "jmutex.h" | | #include "jmutex.h" | |
| | | | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #include <stdio.h> | | #include <stdio.h> | |
| #include <stdint.h> | | #include <stdint.h> | |
| #include <vector> | | #include <vector> | |
| #include <ctype.h> | | #include <ctype.h> | |
| #include <string> | | #include <string> | |
| #include <math.h> | | #include <math.h> | |
| #include <list> | | #include <list> | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| #include <directfb.h> | | #include <directfb.h> | |
| #endif | | #endif | |
| | | | |
| #define DEFAULT_SCALE_WIDTH 1920 | | #define DEFAULT_SCALE_WIDTH 1920 | |
| #define DEFAULT_SCALE_HEIGHT 1080 | | #define DEFAULT_SCALE_HEIGHT 1080 | |
| | | | |
| #define DEFAULT_FONT_SIZE 20 | | #define DEFAULT_FONT_SIZE 20 | |
| | | | |
|
| #define TRUNC_COLOR(r, g, b, a) \ | | | |
| r = (r < 0)?0:(r > 0xff)?0xff:r; \ | | | |
| g = (g < 0)?0:(g > 0xff)?0xff:g; \ | | | |
| b = (b < 0)?0:(b > 0xff)?0xff:b; \ | | | |
| a = (a < 0)?0:(a > 0xff)?0xff:a; \ | | | |
| | | | |
| #define SCALE_TO_SCREEN(x, y, z) \ | | #define SCALE_TO_SCREEN(x, y, z) \ | |
| (int)round(((double)x*(double)y)/(double)z) | | (int)round(((double)x*(double)y)/(double)z) | |
| | | | |
| #define SCREEN_TO_SCALE(x, z, y) \ | | #define SCREEN_TO_SCALE(x, z, y) \ | |
| (int)round(((double)x*(double)y)/(double)z) | | (int)round(((double)x*(double)y)/(double)z) | |
| | | | |
| namespace jgui{ | | namespace jgui{ | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 184 | | skipping to change at line 178 | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| struct jinsets_t { | | struct jinsets_t { | |
| int left; | | int left; | |
| int top; | | int top; | |
| int right; | | int right; | |
| int bottom; | | int bottom; | |
| }; | | }; | |
| | | | |
|
| /** | | | |
| * \brief | | | |
| * | | | |
| */ | | | |
| struct jcolor_t { | | | |
| uint8_t alpha; | | | |
| uint8_t red; | | | |
| uint8_t green; | | | |
| uint8_t blue; | | | |
| | | | |
| jcolor_t Brighter(int r, int g, int b, int a) | | | |
| { | | | |
| r = red + r; | | | |
| g = green + g; | | | |
| b = blue + b; | | | |
| a = alpha + a; | | | |
| | | | |
| TRUNC_COLOR(r, g, b, a); | | | |
| | | | |
| jcolor_t color; | | | |
| | | | |
| color.red = r; | | | |
| color.green = g; | | | |
| color.blue = b; | | | |
| color.alpha = a; | | | |
| | | | |
| return color; | | | |
| } | | | |
| | | | |
| jcolor_t Darker(int r, int g, int b, int a) | | | |
| { | | | |
| return Brighter(-r, -g, -b, -a); | | | |
| } | | | |
| | | | |
| }; | | | |
| | | | |
| class Window; | | class Window; | |
| class Image; | | class Image; | |
| class Font; | | class Font; | |
| class OffScreenImage; | | class OffScreenImage; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class Graphics : public virtual jcommon::Object{ | | class Graphics : public virtual jcommon::Object{ | |
| | | | |
| friend class Window; | | friend class Window; | |
| friend class OffScreenImage; | | friend class OffScreenImage; | |
| | | | |
|
| private: | | protected: | |
| jthread::Mutex graphics_mutex; | | jthread::Mutex graphics_mutex; | |
| | | | |
|
| #ifdef DIRECTFB_UI | | | |
| IDirectFBSurface *surface; | | | |
| #endif | | | |
| | | | |
| struct jregion_t _clip; | | struct jregion_t _clip; | |
|
| struct jpoint_t _translate; | | struct jpoint_t _translate, | |
| | | | |
| | | _translate_image; | |
| struct jsize_t _screen; | | struct jsize_t _screen; | |
| struct jsize_t _scale; | | struct jsize_t _scale; | |
|
| struct jcolor_t _color; | | | |
| jline_join_t _line_join; | | jline_join_t _line_join; | |
| 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; | |
|
| | | Color _color; | |
| double _radians; | | double _radians; | |
| int _line_width; | | int _line_width; | |
| bool _is_premultiply, | | bool _is_premultiply, | |
| _antialias_enabled; | | _antialias_enabled; | |
| | | | |
|
| | | private: | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
|
| | | IDirectFBSurface *surface; | |
| | | | |
| struct edge_t { | | struct edge_t { | |
| struct edge_t *next; | | struct edge_t *next; | |
| | | | |
| int yUpper; | | int yUpper; | |
| double xIntersect; | | double xIntersect; | |
| double dxPerScan; | | double dxPerScan; | |
| }; | | }; | |
| | | | |
| 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 InsertEdge(edge_t *list, edge_t *edge); | | void InsertEdge(edge_t *list, edge_t *edge); | |
| void UpdateActiveList(int scan, edge_t *active); | | void UpdateActiveList(int scan, edge_t *active); | |
|
| void Polygon(int n, int coordinates[]); | | | |
| void FillPolygon0(int n, int ppts[]); | | void FillPolygon0(int n, int ppts[]); | |
| | | | |
| double EvaluateBezier0(double *data, int ndata, double t); | | double EvaluateBezier0(double *data, int ndata, double t); | |
| | | | |
| void DrawRectangle0(int xp, int yp, int wp, int hp, int dx,
int dy, jline_join_t join, int size); | | void DrawRectangle0(int xp, int yp, int wp, int hp, int dx,
int dy, jline_join_t join, int size); | |
| void DrawEllipse0(int xcp, int ycp, int rxp, int ryp, int si
ze); | | void DrawEllipse0(int xcp, int ycp, int rxp, int ryp, int si
ze); | |
| void DrawArc0(int xcp, int ycp, int rxp, int ryp, double arc
0, double arc1, int size, int quadrant); | | void DrawArc0(int xcp, int ycp, int rxp, int ryp, double arc
0, double arc1, int size, int quadrant); | |
| void DrawPie0(int xcp, int ycp, int rxp, int ryp, double arc
0, double arc1, int size); | | void DrawPie0(int xcp, int ycp, int rxp, int ryp, double arc
0, double arc1, int size); | |
| void DrawChord0(int xcp, int ycp, int rxp, int ryp, double a
rc0, double arc1, int size); | | void DrawChord0(int xcp, int ycp, int rxp, int ryp, double a
rc0, double arc1, int size); | |
| | | | |
|
| | | void AntiAlias0(DFBRegion *lines, int size); | |
| | | | |
| void RotateImage0(OffScreenImage *img, int xc, int yc, int x
, int y, int width, int height, double angle, uint8_t alpha); | | void RotateImage0(OffScreenImage *img, int xc, int yc, int x
, int y, int width, int height, double angle, uint8_t alpha); | |
| #endif | | #endif | |
| | | | |
| protected: | | protected: | |
|
| Graphics(void *s, bool offscreen); | | Graphics(void *s, bool premultiplied); | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual ~Graphics(); | | virtual ~Graphics(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 325 | | skipping to change at line 284 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetWorkingScreenSize(int width, int height); | | virtual void SetWorkingScreenSize(int width, int height); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual jsize_t GetWorkingScreenSize(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual OffScreenImage * Create(); | | virtual OffScreenImage * Create(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Rotate(double radians); | | virtual void Rotate(double radians); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Translate(int x, int y); | | virtual void Translate(int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual void TranslateImage(int x, int y); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual double Rotate(); | | virtual double Rotate(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jpoint_t Translate(); | | virtual jpoint_t Translate(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual jpoint_t TranslateImage(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual void SetClip(int x, int y, int width, int height); | | virtual void SetClip(int x, int y, int width, int height); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jregion_t GetClip(); | | virtual jregion_t GetClip(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 397 | | skipping to change at line 374 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Flip(int x, int y, int w, int h); | | virtual void Flip(int x, int y, int w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual struct jcolor_t GetColor(); | | virtual Color & GetColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetColor(struct jcolor_t c); | | virtual void SetColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetColor(uint32_t c); | | virtual void SetColor(uint32_t color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetColor(int r, int g, int b, int a = 0xff); | | virtual void SetColor(int red, int green, int blue, int alph
a = 0xff); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual bool HasFont(); | | virtual bool HasFont(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 653 | | skipping to change at line 630 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | | virtual void DrawTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillPolygon(int x, int y, jpoint_t *p, int num)
; | | virtual void FillPolygon(int xp, int yp, jpoint_t *p, int nu
m); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawPolygon(int x, int y, jpoint_t *p, int num,
bool close); | | virtual void DrawPolygon(int xp, int yp, jpoint_t *p, int nu
m, bool close); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillGradientRectangle(int x, int y, int w, int | | virtual void FillHorizontalGradient(int x, int y, int w, int | |
| h, jcolor_t scolor, jcolor_t dcolor, bool horizontal = true); | | h, Color &scolor, Color &dcolor); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillVerticalGradient(int x, int y, int w, int h | |
| | | , Color &scolor, Color &dcolor); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawGlyph(int symbol, int xp, int yp); | | virtual void DrawGlyph(int symbol, int xp, int yp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
End of changes. 23 change blocks. |
| 60 lines changed or deleted | | 45 lines changed or added | |
|
| jitemcomponent.h | | jitemcomponent.h | |
| | | | |
| skipping to change at line 227 | | skipping to change at line 227 | |
| * \brief | | * \brief | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class ItemComponent : public jgui::Component{ | | class ItemComponent : public jgui::Component{ | |
| | | | |
| protected: | | protected: | |
| std::vector<SelectListener *> _select_listeners; | | std::vector<SelectListener *> _select_listeners; | |
| std::vector<Item *> _items, | | std::vector<Item *> _items, | |
| _internal; | | _internal; | |
|
| jcolor_t _item_color, | | Color _item_color, | |
| _focus_item_color, | | _focus_item_color, | |
| _selected_item_color, | | _selected_item_color, | |
| _selected_item_fgcolor, | | _selected_item_fgcolor, | |
| _item_fgcolor, | | _item_fgcolor, | |
| _focus_item_fgcolor; | | _focus_item_fgcolor; | |
| std::string _text; | | std::string _text; | |
| int _index; | | int _index; | |
| bool _loop; | | bool _loop; | |
| | | | |
| protected: | | protected: | |
| void AddInternalItem(Item *item); | | void AddInternalItem(Item *item); | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 257 | | skipping to change at line 257 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual ~ItemComponent(); | | virtual ~ItemComponent(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemColor(); | | virtual Color & GetItemColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemFocusColor(); | | virtual Color & GetItemFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetSelectedItemColor(); | | virtual Color & GetSelectedItemColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetSelectedItemForegroundColor(); | | virtual Color & GetSelectedItemForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemForegroundColor(); | | virtual Color & GetItemForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemForegroundFocusColor(); | | virtual Color & GetItemForegroundFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemColor(jcolor_t color); | | virtual void SetItemColor(int red, int green, int blue, int
alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemColor(int red, int green, int blue, int
alpha); | | virtual void SetItemFocusColor(int red, int green, int blue,
int alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemFocusColor(jcolor_t color); | | virtual void SetSelectedItemColor(int red, int green, int bl
ue, int alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetSelectedItemColor(jcolor_t color); | | virtual void SetSelectedItemForegroundColor(int red, int gre
en, int blue, int alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetSelectedItemColor(int red, int green, int bl
ue, int alpha); | | virtual void SetItemForegroundColor(int red, int green, int
blue, int alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetSelectedItemForegroundColor(jcolor_t color); | | virtual void SetItemForegroundFocusColor(int red, int green,
int blue, int alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetSelectedItemForegroundColor(int red, int gre
en, int blue, int alpha); | | virtual void SetItemColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemFocusColor(int red, int green, int blue,
int alpha); | | virtual void SetItemFocusColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemForegroundColor(jcolor_t color); | | virtual void SetSelectedItemColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemForegroundColor(int red, int green, int
blue, int alpha); | | virtual void SetSelectedItemForegroundColor(const Color &col
or); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemForegroundFocusColor(jcolor_t color); | | virtual void SetItemForegroundColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetItemForegroundFocusColor(int red, int green,
int blue, int alpha); | | virtual void SetItemForegroundFocusColor(const Color &color)
; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual int GetItemsSize(); | | virtual int GetItemsSize(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
End of changes. 19 change blocks. |
| 24 lines changed or deleted | | 24 lines changed or added | |
|
| jmulticastsocket.h | | jmulticastsocket.h | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 56 | |
| | | | |
| namespace jsocket { | | namespace jsocket { | |
| | | | |
| /** | | /** | |
| * \brief MulticastSocket. | | * \brief MulticastSocket. | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class MulticastSocket : public jsocket::Connection{ | | class MulticastSocket : public jsocket::Connection{ | |
| | | | |
|
| private: | | private: | |
| /** \brief Use to bind the socket in a free port */ | | /** \brief Use to bind the socket in a free port */ | |
| static int _used_port; | | static int _used_port; | |
| | | | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
|
| /** \brief Socket handler. */ | | /** \brief Socket handler. */ | |
| SOCKET _fds, _fdr; | | SOCKET _fds, _fdr; | |
| #else | | #else | |
|
| /** \brief Descriptor */ | | /** \brief Descriptor */ | |
| int _fds, _fdr; | | int _fds, _fdr; | |
| #endif | | #endif | |
|
| /** \brief Local socket */ | | /** \brief Local socket */ | |
| sockaddr_in _sock_s, _sock_r; | | sockaddr_in _sock_s, _sock_r; | |
| /** \brief Input stream */ | | /** \brief Input stream */ | |
| SocketInputStream *_is; | | SocketInputStream *_is; | |
| /** \brief Output stream */ | | /** \brief Output stream */ | |
| SocketOutputStream *_os; | | SocketOutputStream *_os; | |
| /** \brief */ | | /** \brief */ | |
| int64_t _sent_bytes; | | int64_t _sent_bytes; | |
| /** \brief */ | | /** \brief */ | |
| int64_t _receive_bytes; | | int64_t _receive_bytes; | |
| /** \brief */ | | /** \brief */ | |
| std::vector<std::string> _groups; | | std::vector<std::string> _groups; | |
| | | | |
|
| /** | | /** | |
| * \brief Create a new socket | | * \brief Create a new socket | |
| * | | * | |
| */ | | */ | |
| void CreateSocket(); | | void CreateSocket(); | |
| | | | |
|
| /** | | /** | |
| * \brief Bind socket | | * \brief Bind socket | |
| * | | * | |
| */ | | */ | |
| void BindSocket(InetAddress *addr_, int local_port_); | | void BindSocket(InetAddress *addr_, int local_port_); | |
| | | | |
|
| /** | | /** | |
| * \brief Connect socket | | * \brief Connect socket | |
| * | | * | |
| */ | | */ | |
| void ConnectSocket(InetAddress *addr_, int port_); | | void ConnectSocket(InetAddress *addr_, int port_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void InitStream(int rbuf_, int wbuf_); | | void InitStream(int rbuf_, int wbuf_); | |
| | | | |
|
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| MulticastSocket(std::string addr_, int port_, int rbuf_ = 65535, in | | MulticastSocket(std::string addr_, int port_, int rbuf_ = 65 | |
| t wbuf_ = 4096); | | 535, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Destrutor virtual. | | * \brief Destrutor virtual. | |
| * | | * | |
| */ | | */ | |
| virtual ~MulticastSocket(); | | virtual ~MulticastSocket(); | |
| | | | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| virtual SOCKET GetHandler(); | | virtual SOCKET GetHandler(); | |
| #else | | #else | |
| virtual int GetHandler(); | | virtual int GetHandler(); | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::InputStream * GetInputStream(); | | virtual jio::InputStream * GetInputStream(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::OutputStream * GetOutputStream(); | | virtual jio::OutputStream * GetOutputStream(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int size_, bool block_ = true); | | virtual int Receive(char *data_, int size_, bool block_ = tr | |
| | | ue); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int size_, int time_); | | virtual int Receive(char *data_, int size_, int time_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *data_, int size_, bool block_ = true); | | virtual int Send(const char *data_, int size_, bool block_ = | |
| | | true); | |
| | | | |
| /** | | /** | |
|
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *data_, int size_, int time_); | | virtual int Send(const char *data_, int size_, int time_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void Join(std::string group_); | | void Join(std::string group_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void Join(InetAddress *group_); | | void Join(InetAddress *group_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void Leave(std::string group_); | | void Leave(std::string group_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void Leave(InetAddress *group_); | | void Leave(InetAddress *group_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| std::vector<std::string> & GetGroupList(); | | std::vector<std::string> & GetGroupList(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Close(); | | virtual void Close(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| int GetLocalPort(); | | int GetLocalPort(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetSentBytes(); | | virtual int64_t GetSentBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetReceiveBytes(); | | virtual int64_t GetReceiveBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void SetMulticastTTL(char ttl_); | | void SetMulticastTTL(char ttl_); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| SocketOption * GetSocketOption(); | | SocketOption * GetSocketOption(); | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 27 change blocks. |
| 133 lines changed or deleted | | 135 lines changed or added | |
|
| jnullgraphics.h | | jnullgraphics.h | |
| | | | |
| skipping to change at line 77 | | skipping to change at line 77 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetWorkingScreenSize(int width, int height); | | virtual void SetWorkingScreenSize(int width, int height); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual jsize_t GetWorkingScreenSize(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual OffScreenImage * Create(); | | virtual OffScreenImage * Create(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Rotate(double radians); | | virtual void Rotate(double radians); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Translate(int x, int y); | | virtual void Translate(int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual void TranslateImage(int x, int y); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual double Rotate(); | | virtual double Rotate(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jpoint_t Translate(); | | virtual jpoint_t Translate(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual jpoint_t TranslateImage(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual void SetClip(int x, int y, int width, int height); | | virtual void SetClip(int x, int y, int width, int height); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jregion_t GetClip(); | | virtual jregion_t GetClip(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 149 | | skipping to change at line 167 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Flip(int x, int y, int w, int h); | | virtual void Flip(int x, int y, int w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual struct jcolor_t GetColor(); | | virtual Color & GetColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetColor(struct jcolor_t c); | | virtual void SetColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetColor(uint32_t c); | | virtual void SetColor(uint32_t c); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 405 | | skipping to change at line 423 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | | virtual void DrawTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillPolygon(int x, int y, jpoint_t *p, int num)
; | | virtual void FillPolygon(int xp, int yp, jpoint_t *p, int nu
m); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawPolygon(int x, int y, jpoint_t *p, int num,
bool close); | | virtual void DrawPolygon(int xp, int yp, jpoint_t *p, int nu
m, bool close); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillGradientRectangle(int x, int y, int w, int | | virtual void FillHorizontalGradient(int x, int y, int w, int | |
| h, jcolor_t scolor, jcolor_t dcolor, bool horizontal = true); | | h, Color &scolor, Color &dcolor); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillVerticalGradient(int x, int y, int w, int h | |
| | | , Color &scolor, Color &dcolor); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawGlyph(int symbol, int xp, int yp); | | virtual void DrawGlyph(int symbol, int xp, int yp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
End of changes. 8 change blocks. |
| 6 lines changed or deleted | | 31 lines changed or added | |
|
| jrawsocket.h | | jrawsocket.h | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 58 | |
| #include <stdint.h> | | #include <stdint.h> | |
| | | | |
| namespace jsocket { | | namespace jsocket { | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| struct jip_hdr_t { | | struct jip_hdr_t { | |
| unsigned int ip_hl:4, | | unsigned int ip_hl:4, | |
|
| ip_v:4; | | ip_v:4; | |
| uint8_t ip_tos; | | uint8_t ip_tos; | |
| unsigned short ip_len; | | unsigned short ip_len; | |
| unsigned short ip_id; | | unsigned short ip_id; | |
| unsigned short ip_off; | | unsigned short ip_off; | |
| uint8_t ip_ttl; | | uint8_t ip_ttl; | |
| uint8_t ip_p; | | uint8_t ip_p; | |
| unsigned short ip_sum; | | unsigned short ip_sum; | |
| unsigned long saddr, daddr; | | unsigned long saddr, daddr; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| struct jtcp_hdr_t { | | struct jtcp_hdr_t { | |
|
| unsigned short th_sport; | | unsigned short th_sport; | |
| unsigned short th_dport; | | unsigned short th_dport; | |
| unsigned long th_seq; | | unsigned long th_seq; | |
| unsigned long th_syn; | | unsigned long th_syn; | |
| unsigned int th_x2:4, | | unsigned int th_x2:4, | |
|
| th_off:4; | | th_off:4; | |
| uint8_t th_flags; | | uint8_t th_flags; | |
| unsigned short th_win; | | unsigned short th_win; | |
| unsigned short th_sum; | | unsigned short th_sum; | |
| unsigned short th_urp; | | unsigned short th_urp; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| struct jtcpopt_hdr_t { | | struct jtcpopt_hdr_t { | |
|
| uint8_t type; | | uint8_t type; | |
| uint8_t len; | | uint8_t len; | |
| unsigned short value; | | unsigned short value; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| struct jpseudo_hdr_t { | | struct jpseudo_hdr_t { | |
|
| unsigned long saddr, daddr; | | unsigned long saddr, daddr; | |
| uint8_t mbz, ptcl; | | uint8_t mbz, ptcl; | |
| unsigned short tcpl; | | unsigned short tcpl; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| struct jpacket_t { | | struct jpacket_t { | |
|
| struct iphdr ip; | | struct iphdr ip; | |
| struct tcphdr tcp; | | struct tcphdr tcp; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| struct jcksum_t { | | struct jcksum_t { | |
|
| struct jpseudo_hdr_t pseudo; | | struct jpseudo_hdr_t pseudo; | |
| struct tcphdr tcp; // WARN:: eh isso mesmo ? | | struct tcphdr tcp; // WARN:: eh isso mesmo ? | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief Socket RAW. | | * \brief Socket RAW. | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class RawSocket : public jsocket::Connection{ | | class RawSocket : public jsocket::Connection{ | |
| | | | |
|
| private: | | private: | |
| /** \brief Use to bind the socket in a free port. */ | | /** \brief Use to bind the socket in a free port. */ | |
| static int _used_port; | | static int _used_port; | |
| | | | |
|
| /** \brief Socket handler. */ | | /** \brief Socket handler. */ | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| SOCKET _fd; | | SOCKET _fd; | |
| #else | | #else | |
|
| int _fd; | | int _fd; | |
| #endif | | #endif | |
|
| /** \brief Local socket. */ | | /** \brief Local socket. */ | |
| sockaddr_in _lsock; | | sockaddr_in _lsock; | |
| /** \brief Server socket UDP. */ | | /** \brief Server socket UDP. */ | |
| sockaddr_in _server_sock; | | sockaddr_in _server_sock; | |
| /** \brief Local inetaddress. */ | | /** \brief Local inetaddress. */ | |
| InetAddress *_local; | | InetAddress *_local; | |
| /** \brief Remote inetaddress. */ | | /** \brief Remote inetaddress. */ | |
| InetAddress *_address; | | InetAddress *_address; | |
| /** \brief Input stream. */ | | /** \brief Input stream. */ | |
| SocketInputStream *_is; | | SocketInputStream *_is; | |
| /** \brief Output stream. */ | | /** \brief Output stream. */ | |
| SocketOutputStream *_os; | | SocketOutputStream *_os; | |
| /** \brief Bytes sent. */ | | /** \brief Bytes sent. */ | |
| int64_t _sent_bytes; | | int64_t _sent_bytes; | |
| /** \brief Bytes received. */ | | /** \brief Bytes received. */ | |
| int64_t _receive_bytes; | | int64_t _receive_bytes; | |
| /** \brief */ | | /** \brief */ | |
| int _timeout; | | int _timeout; | |
|
| /** \brief */ | | /** \brief */ | |
| struct ifreq _ifr; | | struct ifreq _ifr; | |
|
| /** \brief */ | | /** \brief */ | |
| int _index_device; | | int _index_device; | |
|
| /** \brief */ | | /** \brief */ | |
| bool _promisc; | | bool _promisc; | |
|
| /** \brief */ | | /** \brief */ | |
| std::string _device; | | std::string _device; | |
| | | | |
|
| /** | | /** | |
| * \brief Create a new socket. | | * \brief Create a new socket. | |
| * | | * | |
| */ | | */ | |
| void CreateSocket(); | | void CreateSocket(); | |
| | | | |
|
| /** | | /** | |
| * \brief Bind socket. | | * \brief Bind socket. | |
| * | | * | |
| */ | | */ | |
| void BindSocket(); | | void BindSocket(); | |
| | | | |
|
| /** | | /** | |
| * \brief Init the stream. | | * \brief Init the stream. | |
| * | | * | |
| */ | | */ | |
| void InitStream(int rbuf_, int wbuf_); | | void InitStream(int rbuf_, int wbuf_); | |
| | | | |
|
| public: | | public: | |
| /** | | /** | |
| * \brief Construtor UDP client. | | * \brief Construtor UDP client. | |
| * | | * | |
| */ | | */ | |
| RawSocket(std::string device_ = "lo", bool promisc_ = true, int tim | | RawSocket(std::string device_ = "lo", bool promisc_ = true, | |
| eout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); | | int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Destructor virtual. | | * \brief Destructor virtual. | |
| * | | * | |
| */ | | */ | |
| virtual ~RawSocket(); | | virtual ~RawSocket(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::InputStream * GetInputStream(); | | virtual jio::InputStream * GetInputStream(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::OutputStream * GetOutputStream(); | | virtual jio::OutputStream * GetOutputStream(); | |
| | | | |
| /** | | /** | |
|
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| virtual SOCKET GetHandler(); | | virtual SOCKET GetHandler(); | |
| #else | | #else | |
| virtual int GetHandler(); | | virtual int GetHandler(); | |
| #endif | | #endif | |
| | | | |
|
| /** | | /** | |
| * \brief Read data from a source. | | * \brief Read data from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int size_, int time_); | | virtual int Receive(char *data_, int size_, int time_); | |
| | | | |
|
| /** | | /** | |
| * \brief Read data from a source. | | * \brief Read data from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int size_, bool block_ = true); | | virtual int Receive(char *data_, int size_, bool block_ = tr | |
| | | ue); | |
| | | | |
|
| /** | | /** | |
| * \brief Write data to a source. | | * \brief Write data to a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *data_, int size_, int time_); | | virtual int Send(const char *data_, int size_, int time_); | |
| | | | |
|
| /** | | /** | |
| * \brief Write data to a source. | | * \brief Write data to a source. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *data_, int size_, bool block_ = true); | | virtual int Send(const char *data_, int size_, bool block_ = | |
| | | true); | |
| | | | |
|
| /** | | /** | |
| * \brief Close the socket. | | * \brief Close the socket. | |
| * | | * | |
| */ | | */ | |
| virtual void Close(); | | virtual void Close(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| sockaddr_in LocalAddress(); | | sockaddr_in LocalAddress(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| sockaddr_in RemoteAddress(); | | sockaddr_in RemoteAddress(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get InetAddress. | | * \brief Get InetAddress. | |
| * | | * | |
| */ | | */ | |
| InetAddress * GetInetAddress(); | | InetAddress * GetInetAddress(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get the local port. | | * \brief Get the local port. | |
| * | | * | |
| */ | | */ | |
| int GetLocalPort(); | | int GetLocalPort(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get port. | | * \brief Get port. | |
| * | | * | |
| */ | | */ | |
| int GetPort(); | | int GetPort(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get sent bytes to destination. | | * \brief Get sent bytes to destination. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetSentBytes(); | | virtual int64_t GetSentBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get received bytes from a source. | | * \brief Get received bytes from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetReceiveBytes(); | | virtual int64_t GetReceiveBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get a object SocketOption. | | * \brief Get a object SocketOption. | |
| * | | * | |
| */ | | */ | |
| SocketOption * GetSocketOption(); | | SocketOption * GetSocketOption(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| unsigned short Checksum(unsigned short *addr, int len); | | unsigned short Checksum(unsigned short *addr, int len); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| std::string what(); | | virtual std::string what(); | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 37 change blocks. |
| 156 lines changed or deleted | | 158 lines changed or added | |
|
| jrtpsocket.h | | jrtpsocket.h | |
| | | | |
| skipping to change at line 431 | | skipping to change at line 431 | |
| uint8_tsdes_len[RTCP_SDES_MAX]; | | uint8_tsdes_len[RTCP_SDES_MAX]; | |
| char *sdes_data[RTCP_SDES_MAX]; | | char *sdes_data[RTCP_SDES_MAX]; | |
| } rtp_source; | | } rtp_source; | |
| /** | | /** | |
| * \brief InetAddress. | | * \brief InetAddress. | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class RTPSocket : public virtual jcommon::Object{ | | class RTPSocket : public virtual jcommon::Object{ | |
| | | | |
|
| private: | | private: | |
| /** \brief */ | | /** \brief */ | |
| int Remote_Port; | | int Remote_Port; | |
| /** \brief */ | | /** \brief */ | |
| int Data_Sock; | | int Data_Sock; | |
| /** \brief */ | | /** \brief */ | |
| int Control_Sock; | | int Control_Sock; | |
| /** \brief */ | | /** \brief */ | |
| int Send_Sock; | | int Send_Sock; | |
| /** \brief */ | | /** \brief */ | |
| uint32_t My_Ssrc; | | uint32_t My_Ssrc; | |
| | | | |
| skipping to change at line 461 | | skipping to change at line 461 | |
| struct timeval Next_Report; | | struct timeval Next_Report; | |
| /** \brief */ | | /** \brief */ | |
| uint32_t Rtp_Packets_Sent; | | uint32_t Rtp_Packets_Sent; | |
| /** \brief */ | | /** \brief */ | |
| uint32_t Rtp_Octets_Sent; | | uint32_t Rtp_Octets_Sent; | |
| /** \brief */ | | /** \brief */ | |
| int Avg_Rtcp_Size; | | int Avg_Rtcp_Size; | |
| /** \brief */ | | /** \brief */ | |
| int We_Called; | | int We_Called; | |
| | | | |
|
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| RTPSocket(); | | RTPSocket(); | |
| | | | |
|
| /** | | /** | |
| * \brief Destructor virtual. | | * \brief Destructor virtual. | |
|
| * | | * | |
| */ | | */ | |
| virtual ~RTPSocket(); | | virtual ~RTPSocket(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void Lock(std::string name); | | void Lock(std::string name); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void Unlock(std::string name); | | void Unlock(std::string name); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual int Send(const char *b_, int size_); | | virtual int Send(const char *b_, int size_); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual int Receive(char *data_, int data_length_); | | virtual int Receive(char *data_, int data_length_); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void Close(); | | virtual void Close(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual SocketInputStream * GetInputStream(); | | virtual SocketInputStream * GetInputStream(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual SocketOutputStream * GetOutputStream(); | | virtual SocketOutputStream * GetOutputStream(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual int64_t GetSentBytes(); | | virtual int64_t GetSentBytes(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual int64_t GetReceiveBytes(); | | virtual int64_t GetReceiveBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| int ssrc_equal(const void *a, const void *b); | | int ssrc_equal(const void *a, const void *b); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| unsigned int ssrc_hash(const void *key); | | unsigned int ssrc_hash(const void *key); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void open_sockets(int port); | | void open_sockets(int port); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void set_next_report_time(int packetsize, int init); | | void set_next_report_time(int packetsize, int init); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| char * make_cname(void); | | char * make_cname(void); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| int send_rtcp_sr(void); | | int send_rtcp_sr(void); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void send_switch_packet(void); | | void send_switch_packet(void); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void maybe_send_rtcp(void); | | void maybe_send_rtcp(void); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void connection_init(int port); | | void connection_init(int port); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void connection_call(char *hostname); | | void connection_call(char *hostname); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| bool connection_connected(void); | | bool connection_connected(void); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| char * connection_hostname(void); | | char * connection_hostname(void); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| rtp_source * find_member(uint32_t src); | | rtp_source * find_member(uint32_t src); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| rtp_source * add_member(uint32_t src, uint16_t seq, struct i
n_addr *addr); | | rtp_source * add_member(uint32_t src, uint16_t seq, struct i
n_addr *addr); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void member_sdes(rtp_source *s, uint8_ttype, char *data, uin
t8_tlength); | | void member_sdes(rtp_source *s, uint8_ttype, char *data, uin
t8_tlength); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| bool check_from(struct sockaddr_in *fromaddr, rtp_source *s)
; | | bool check_from(struct sockaddr_in *fromaddr, rtp_source *s)
; | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void rtp_send(char *buf, int nbytes, rtp_payload_t pt, uint3
2_t nsamp); | | void rtp_send(char *buf, int nbytes, rtp_payload_t pt, uint3
2_t nsamp); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void parse_rtp_packet(Rtp_Packet packet, struct sockaddr_in
*fromaddr); | | void parse_rtp_packet(Rtp_Packet packet, struct sockaddr_in
*fromaddr); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void parse_rtcp_app_packet(Rtcp_Packet packet, struct sockad
dr_in *fromaddr); | | void parse_rtcp_app_packet(Rtcp_Packet packet, struct sockad
dr_in *fromaddr); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void parse_rtcp_packet(Rtcp_Packet packet, struct sockaddr_i
n *fromaddr); | | void parse_rtcp_packet(Rtcp_Packet packet, struct sockaddr_i
n *fromaddr); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void parse_rtcp_compound(Rtcp_Compound compound, struct sock
addr_in *fromaddr); | | void parse_rtcp_compound(Rtcp_Compound compound, struct sock
addr_in *fromaddr); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| int connection_listen(float timeout); | | int connection_listen(float timeout); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| std::string what(); | | virtual std::string what(); | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 34 change blocks. |
| 106 lines changed or deleted | | 106 lines changed or added | |
|
| jsocket.h | | jsocket.h | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 54 | |
| | | | |
| class ServerSocket; | | class ServerSocket; | |
| | | | |
| /** | | /** | |
| * \brief Socket. | | * \brief Socket. | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class Socket : public jsocket::Connection{ | | class Socket : public jsocket::Connection{ | |
| | | | |
|
| friend class ServerSocket; //Socket * ServerSocket::Accept(); | | friend class ServerSocket; //Socket * ServerSocket::Accept(); | |
| | | | |
|
| private: | | private: | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
|
| /** \brief Socket handler. */ | | /** \brief Socket handler. */ | |
| SOCKET _fd; | | SOCKET _fd; | |
| #else | | #else | |
|
| /** \brief Socket handler. */ | | /** \brief Socket handler. */ | |
| int _fd; | | int _fd; | |
| #endif | | #endif | |
|
| /** \brief */ | | /** \brief */ | |
| SocketInputStream *_is; | | SocketInputStream *_is; | |
| /** \brief */ | | /** \brief */ | |
| SocketOutputStream *_os; | | SocketOutputStream *_os; | |
| /** \brief */ | | /** \brief */ | |
| sockaddr_in _lsock; | | sockaddr_in _lsock; | |
| /** \brief */ | | /** \brief */ | |
| sockaddr_in _server_sock; | | sockaddr_in _server_sock; | |
| /** \brief */ | | /** \brief */ | |
| InetAddress *_address; | | InetAddress *_address; | |
| /** \brief Bytes sent. */ | | /** \brief Bytes sent. */ | |
| int64_t _sent_bytes; | | int64_t _sent_bytes; | |
| /** \brief Bytes received. */ | | /** \brief Bytes received. */ | |
| int64_t _receive_bytes; | | int64_t _receive_bytes; | |
| /** \brief */ | | /** \brief */ | |
| int _timeout; | | int _timeout; | |
| | | | |
|
| /** | | /** | |
| * \brief Create a new socket. | | * \brief Create a new socket. | |
| * | | * | |
| */ | | */ | |
| void CreateSocket(); | | void CreateSocket(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void BindSocket(InetAddress *, int); | | void BindSocket(InetAddress *, int); | |
| | | | |
|
| /** | | /** | |
| * \brief Connect the socket. | | * \brief Connect the socket. | |
| * | | * | |
| */ | | */ | |
| void ConnectSocket(InetAddress *, int); | | void ConnectSocket(InetAddress *, int); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| void InitStreams(int64_t rbuf_, int64_t wbuf_); | | void InitStreams(int64_t rbuf_, int64_t wbuf_); | |
| | | | |
|
| public: | | public: | |
| /** | | /** | |
| * \brief Constructor. | | * \brief Constructor. | |
| * | | * | |
| */ | | */ | |
|
| Socket(int handler_, sockaddr_in server_, int timeout_ = 0, int rbu
f_ = 65535, int wbuf_ = 4096); | | Socket(int handler_, sockaddr_in server_, int timeout_ = 0,
int rbuf_ = 65535, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Constructor. | | * \brief Constructor. | |
| * | | * | |
| */ | | */ | |
| Socket(InetAddress *addr_, int port_, int timeout_ = 0, int rbuf_ = | | Socket(InetAddress *addr_, int port_, int timeout_ = 0, int | |
| 65535, int wbuf_ = 4096); | | rbuf_ = 65535, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Constructor. | | * \brief Constructor. | |
| * | | * | |
| */ | | */ | |
| Socket(InetAddress *addr_, int port_, InetAddress *local_addr_, int | | Socket(InetAddress *addr_, int port_, InetAddress *local_add | |
| local_port_, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); | | r_, int local_port_, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096) | |
| | | ; | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| Socket(std::string host_, int port_, int timeout_ = 0, int rbuf_ = | | Socket(std::string host_, int port_, int timeout_ = 0, int r | |
| 65535, int wbuf_ = 4096); | | buf_ = 65535, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Constructor. | | * \brief Constructor. | |
| * | | * | |
| */ | | */ | |
| Socket(std::string host_, int port_, InetAddress *local_addr_, int | | Socket(std::string host_, int port_, InetAddress *local_addr | |
| local_port_, int timeout_ = 0, int rbuf_ = 4096, int wbuf_ = 4096); | | _, int local_port_, int timeout_ = 0, int rbuf_ = 4096, int wbuf_ = 4096); | |
| | | | |
|
| /** | | /** | |
| * \brief Destrutor virtual. | | * \brief Destrutor virtual. | |
| * | | * | |
| */ | | */ | |
| virtual ~Socket(); | | virtual ~Socket(); | |
| | | | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| virtual SOCKET GetHandler(); | | virtual SOCKET GetHandler(); | |
| #else | | #else | |
| virtual int GetHandler(); | | virtual int GetHandler(); | |
| #endif | | #endif | |
| | | | |
|
| /** | | /** | |
| * \brief Send bytes to a destination. | | * \brief Send bytes to a destination. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *b_, int size_, bool block_ = true); | | virtual int Send(const char *b_, int size_, bool block_ = tr | |
| | | ue); | |
| | | | |
|
| /** | | /** | |
| * \brief Send bytes to a destination waiting a timeout. | | * \brief Send bytes to a destination waiting a timeout. | |
| * | | * | |
| */ | | */ | |
| virtual int Send(const char *b_, int size_, int time_); | | virtual int Send(const char *b_, int size_, int time_); | |
| | | | |
|
| /** | | /** | |
| * \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 ha | |
| shutdown (now throws). | | s shutdown (now throws). | |
| * | | * | |
| * \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 bloc | |
| ue); | | k_ = true); | |
| | | | |
|
| /** | | /** | |
| * \brief Receive bytes from a source waiting a timeout. | | * \brief Receive bytes from a source waiting a timeout. | |
| * | | * | |
| */ | | */ | |
| virtual int Receive(char *data_, int data_length_, int time_); | | virtual int Receive(char *data_, int data_length_, int time_ | |
| | | ); | |
| | | | |
|
| /** | | /** | |
| * \brief Close the socket. | | * \brief Close the socket. | |
| * | | * | |
| */ | | */ | |
| virtual void Close(); | | virtual void Close(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::InputStream * GetInputStream(); | | virtual jio::InputStream * GetInputStream(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jio::OutputStream * GetOutputStream(); | | virtual jio::OutputStream * GetOutputStream(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| InetAddress * GetInetAddress(); | | InetAddress * GetInetAddress(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get the local port. | | * \brief Get the local port. | |
| * | | * | |
| */ | | */ | |
| int GetLocalPort(); | | int GetLocalPort(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get the port. | | * \brief Get the port. | |
| * | | * | |
| */ | | */ | |
| int GetPort(); | | int GetPort(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get the bytes sent to a destination. | | * \brief Get the bytes sent to a destination. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetSentBytes(); | | virtual int64_t GetSentBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get de bytes received from a source. | | * \brief Get de bytes received from a source. | |
| * | | * | |
| */ | | */ | |
| virtual int64_t GetReceiveBytes(); | | virtual int64_t GetReceiveBytes(); | |
| | | | |
|
| /** | | /** | |
| * \brief Get the socket options. | | * \brief Get the socket options. | |
| * | | * | |
| */ | | */ | |
| SocketOption * GetSocketOption(); | | SocketOption * GetSocketOption(); | |
| | | | |
|
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| std::string what(); | | virtual std::string what(); | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 30 change blocks. |
| 147 lines changed or deleted | | 150 lines changed or added | |
|
| jtable.h | | jtable.h | |
| | | | |
| skipping to change at line 45 | | skipping to change at line 45 | |
| * \brief | | * \brief | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class Cell : public virtual jcommon::Object{ | | class Cell : public virtual jcommon::Object{ | |
| | | | |
| friend class Table; | | friend class Table; | |
| | | | |
| private: | | private: | |
| Table *_table; | | Table *_table; | |
|
| | | Color _cell_bgcolor, | |
| | | _cell_fgcolor; | |
| std::string _value; | | std::string _value; | |
|
| int _bgcell_red, | | | |
| _bgcell_green, | | | |
| _bgcell_blue, | | | |
| _bgcell_alpha; | | | |
| int _fgcell_red, | | | |
| _fgcell_green, | | | |
| _fgcell_blue, | | | |
| _fgcell_alpha; | | | |
| jhorizontal_align_t _halign; | | jhorizontal_align_t _halign; | |
| jvertical_align_t _valign; | | jvertical_align_t _valign; | |
| | | | |
| Cell(Table *table); | | Cell(Table *table); | |
| | | | |
| public: | | public: | |
| virtual ~Cell(); | | virtual ~Cell(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 72 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual std::string GetValue(); | | virtual std::string GetValue(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetCellBackgroundColor(jcolor_t color); | | virtual Color & GetCellBackgroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetCellForegroundColor(jcolor_t color); | | virtual Color & GetCellForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetCellBackgroundColor(int r, int g, int b, int
a); | | virtual void SetCellBackgroundColor(int red, int green, int
blue, int alpha); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetCellForegroundColor(int r, int g, int b, int | | virtual void SetCellForegroundColor(int red, int green, int | |
| a); | | blue, int alpha); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void SetCellBackgroundColor(const Color &color); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void SetCellForegroundColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetHorizontalAlign(jhorizontal_align_t align); | | virtual void SetHorizontalAlign(jhorizontal_align_t align); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 138 | | skipping to change at line 144 | |
| */ | | */ | |
| class Table : public Component, public virtual jcommon::Object{ | | class Table : public Component, public virtual jcommon::Object{ | |
| | | | |
| friend class Cell; | | friend class Cell; | |
| | | | |
| private: | | private: | |
| std::vector<int> _row_size; | | std::vector<int> _row_size; | |
| std::vector<int> _column_size; | | std::vector<int> _column_size; | |
| std::vector<Cell *> _header; | | std::vector<Cell *> _header; | |
| std::vector<std::vector<Cell *> * > _cells; | | std::vector<std::vector<Cell *> * > _cells; | |
|
| | | Color _grid_color; | |
| int _column, | | int _column, | |
|
| _row; | | _row; | |
| int _columns, | | int _columns, | |
|
| _rows; | | _rows; | |
| int _grid_red, | | | |
| _grid_green, | | | |
| _grid_blue, | | | |
| _grid_alpha; | | | |
| bool _header_visible, | | bool _header_visible, | |
|
| _loop; | | _loop; | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| Table(int x = 0, int y = 0, int width = 0, int height = 0); | | Table(int x = 0, int y = 0, int width = 0, int height = 0); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 280 | | skipping to change at line 283 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetCell(Cell *cell, int row, int column); | | virtual void SetCell(Cell *cell, int row, int column); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetGridColor(jcolor_t color); | | virtual Color & GetGridColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetGridColor(int r, int g, int b, int a); | | virtual void SetGridColor(int red, int green, int blue, int | |
| | | alpha); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void SetGridColor(const Color &color); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetColumnSize(int index, int size); | | virtual void SetColumnSize(int index, int size); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
End of changes. 12 change blocks. |
| 22 lines changed or deleted | | 32 lines changed or added | |
|
| jtheme.h | | jtheme.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_THEME_H | | #ifndef J_THEME_H | |
| #define J_THEME_H | | #define J_THEME_H | |
| | | | |
|
| #include "jgraphics.h" | | | |
| #include "jcomponent.h" | | #include "jcomponent.h" | |
| | | | |
| #include <string> | | #include <string> | |
| | | | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| | | | |
| namespace jgui { | | namespace jgui { | |
| | | | |
| class Component; | | class Component; | |
| class Window; | | class Window; | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 52 | |
| friend class ThemeManager; | | friend class ThemeManager; | |
| friend class Component; | | friend class Component; | |
| friend class Window; | | friend class Window; | |
| friend class ItemComponent; | | friend class ItemComponent; | |
| friend class Frame; | | friend class Frame; | |
| | | | |
| private: | | private: | |
| Font *_window_font, | | Font *_window_font, | |
| *_component_font; | | *_component_font; | |
| jinsets_t _insets; | | jinsets_t _insets; | |
|
| jcolor_t _window_bgcolor, | | Color _window_bgcolor, | |
| _window_fgcolor, | | _window_fgcolor, | |
| _window_border_color, | | _window_border_color, | |
| _component_bgcolor, | | _component_bgcolor, | |
| _component_fgcolor, | | _component_fgcolor, | |
| _component_border_color, | | _component_border_color, | |
| _component_border_focus_col | | _component_border_focus_color, | |
| or, | | _component_focus_bgcolor, | |
| _component_focus_bgcolor, | | _component_focus_fgcolor, | |
| _component_focus_fgcolor, | | _item_color, | |
| _item_color, | | _item_focus_color, | |
| _item_focus_color, | | _item_selected_color, | |
| _item_selected_color, | | _item_selected_fgcolor, | |
| _item_selected_fgcolor, | | _item_fgcolor, | |
| _item_fgcolor, | | _item_focus_fgcolor; | |
| _item_focus_fgcolor; | | | |
| jcomponent_border_t _component_border, | | jcomponent_border_t _component_border, | |
|
_window_border; | |
_window_border; | |
| int _window_border_size, | | int _window_border_size, | |
| _component_border_size; | | _component_border_size; | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| | | | |
| skipping to change at line 228 | | skipping to change at line 227 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetComponentFont(Font *font); | | virtual void SetComponentFont(Font *font); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetWindowBackgroundColor(); | | virtual Color & GetWindowBackgroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetWindowForegroundColor(); | | virtual Color & GetWindowForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetWindowBorderColor(); | | virtual Color & GetWindowBorderColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetComponentBackgroundColor(); | | virtual Color & GetComponentBackgroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetComponentForegroundColor(); | | virtual Color & GetComponentForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetComponentBorderColor(); | | virtual Color & GetComponentBorderColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetComponentBorderFocusColor(); | | virtual Color & GetComponentBorderFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetComponentBackgroundFocusColor(); | | virtual Color & GetComponentBackgroundFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetComponentForegroundFocusColor(); | | virtual Color & GetComponentForegroundFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemColor(); | | virtual Color & GetItemColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemFocusColor(); | | virtual Color & GetItemFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetSelectedItemColor(); | | virtual Color & GetSelectedItemColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetSelectedItemForegroundColor(); | | virtual Color & GetSelectedItemForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemForegroundColor(); | | virtual Color & GetItemForegroundColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jcolor_t GetItemForegroundFocusColor(); | | virtual Color & GetItemForegroundFocusColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jcomponent_border_t GetComponentBorder(); | | virtual jcomponent_border_t GetComponentBorder(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
End of changes. 17 change blocks. |
| 32 lines changed or deleted | | 30 lines changed or added | |
|