NO-OP: whitespace, indent

This commit is contained in:
Robin Gareus 2019-09-30 19:06:00 +02:00
parent 0a6f517230
commit bfec73b8c3
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
9 changed files with 155 additions and 153 deletions

View file

@ -19,10 +19,10 @@
#ifndef __CANVAS_ARC_H__ #ifndef __CANVAS_ARC_H__
#define __CANVAS_ARC_H__ #define __CANVAS_ARC_H__
#include "canvas/visibility.h" #include "canvas/fill.h"
#include "canvas/item.h" #include "canvas/item.h"
#include "canvas/outline.h" #include "canvas/outline.h"
#include "canvas/fill.h" #include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {

View file

@ -29,18 +29,19 @@
#include <set> #include <set>
#include <gdkmm/window.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/alignment.h> #include <gtkmm/alignment.h>
#include <cairomm/surface.h> #include <gtkmm/eventbox.h>
#include <gdkmm/window.h>
#include <cairomm/context.h> #include <cairomm/context.h>
#include <cairomm/surface.h>
#include "pbd/signals.h" #include "pbd/signals.h"
#include "gtkmm2ext/cairo_canvas.h" #include "gtkmm2ext/cairo_canvas.h"
#include "canvas/visibility.h"
#include "canvas/root_group.h" #include "canvas/root_group.h"
#include "canvas/visibility.h"
namespace Gtk { namespace Gtk {
class Window; class Window;
@ -134,21 +135,21 @@ public:
virtual Coord height () const = 0; virtual Coord height () const = 0;
/** Store the coordinates of the mouse pointer in window coordinates in /** Store the coordinates of the mouse pointer in window coordinates in
@param winpos. Return true if the position was within the window, * @param winpos. Return true if the position was within the window,
false otherwise. * false otherwise.
*/ */
virtual bool get_mouse_position (Duple& winpos) const = 0; virtual bool get_mouse_position (Duple& winpos) const = 0;
/** Signal to be used by items that need to track the mouse position /** Signal to be used by items that need to track the mouse position
within the window. * within the window.
*/ */
sigc::signal<void,Duple const&> MouseMotion; sigc::signal<void,Duple const&> MouseMotion;
sigc::signal<void> PreRender; sigc::signal<void> PreRender;
/** Ensures that the position given by @param winpos (in window /** Ensures that the position given by @param winpos (in window
coordinates) is within the current window area, possibly reduced by * coordinates) is within the current window area, possibly reduced by
@param border. * @param border.
*/ */
Duple clamp_to_window (Duple const& winpos, Duple border = Duple()); Duple clamp_to_window (Duple const& winpos, Duple border = Duple());
@ -159,7 +160,7 @@ public:
void dump (std::ostream&) const; void dump (std::ostream&) const;
/** Ask the canvas to pick the current item again, and generate /** Ask the canvas to pick the current item again, and generate
an enter event for it. * an enter event for it.
*/ */
virtual void re_enter () = 0; virtual void re_enter () = 0;

View file

@ -19,8 +19,8 @@
#ifndef __CANVAS_INTERPOLATED_CURVE_H__ #ifndef __CANVAS_INTERPOLATED_CURVE_H__
#define __CANVAS_INTERPOLATED_CURVE_H__ #define __CANVAS_INTERPOLATED_CURVE_H__
#include "canvas/visibility.h"
#include "canvas/types.h" #include "canvas/types.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {

View file

@ -29,11 +29,11 @@
#include "pbd/signals.h" #include "pbd/signals.h"
#include "canvas/visibility.h"
#include "canvas/types.h"
#include "canvas/fill.h" #include "canvas/fill.h"
#include "canvas/outline.h"
#include "canvas/lookup_table.h" #include "canvas/lookup_table.h"
#include "canvas/outline.h"
#include "canvas/types.h"
#include "canvas/visibility.h"
namespace ArdourCanvas namespace ArdourCanvas
{ {
@ -149,9 +149,9 @@ public:
void size_allocate (Rect const&); void size_allocate (Rect const&);
/** bounding box is the public API to get the size of the item. /** bounding box is the public API to get the size of the item.
If @param for_own_purposes is false, then it will return the * If @param for_own_purposes is false, then it will return the
allocated bounding box (if there is one) in preference to the * allocated bounding box (if there is one) in preference to the
one that would naturally be computed by the item. * one that would naturally be computed by the item.
*/ */
Rect bounding_box (bool for_own_purposes = false) const; Rect bounding_box (bool for_own_purposes = false) const;
Rect allocation() const { return _allocation; } Rect allocation() const { return _allocation; }
@ -165,7 +165,7 @@ public:
Rect parent_to_item (Rect const &) const; Rect parent_to_item (Rect const &) const;
/* XXX: it's a pity these two aren't the same form as item_to_parent etc., /* XXX: it's a pity these two aren't the same form as item_to_parent etc.,
but it makes a bit of a mess in the rest of the code if they are not. * but it makes a bit of a mess in the rest of the code if they are not.
*/ */
void canvas_to_item (Coord &, Coord &) const; void canvas_to_item (Coord &, Coord &) const;
void item_to_canvas (Coord &, Coord &) const; void item_to_canvas (Coord &, Coord &) const;
@ -336,5 +336,4 @@ extern LIBCANVAS_API std::ostream& operator<< (std::ostream&, const ArdourCanvas
} }
#endif #endif

View file

@ -20,16 +20,16 @@
#ifndef __CANVAS_LINE_H__ #ifndef __CANVAS_LINE_H__
#define __CANVAS_LINE_H__ #define __CANVAS_LINE_H__
#include "canvas/visibility.h"
#include "canvas/item.h" #include "canvas/item.h"
#include "canvas/outline.h" #include "canvas/outline.h"
#include "canvas/poly_line.h" #include "canvas/poly_line.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
class LIBCANVAS_API Line : public Item class LIBCANVAS_API Line : public Item
{ {
public: public:
Line (Canvas*); Line (Canvas*);
Line (Item*); Line (Item*);

View file

@ -23,8 +23,8 @@
#include <vector> #include <vector>
#include "canvas/visibility.h"
#include "canvas/item.h" #include "canvas/item.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {

View file

@ -21,9 +21,9 @@
#ifndef __CANVAS_POLY_LINE_H__ #ifndef __CANVAS_POLY_LINE_H__
#define __CANVAS_POLY_LINE_H__ #define __CANVAS_POLY_LINE_H__
#include "canvas/visibility.h"
#include "canvas/poly_item.h"
#include "canvas/outline.h" #include "canvas/outline.h"
#include "canvas/poly_item.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
@ -39,10 +39,11 @@ public:
virtual void compute_bounding_box () const; virtual void compute_bounding_box () const;
bool covers (Duple const &) const; bool covers (Duple const &) const;
/** /**
* Set the distance at which a point will be considered to be covered * Set the distance at which a point will be considered to be covered
* by the line. For the definition of "distance" see * by the line. For the definition of "distance" see
* utils.cc:distance_to_segment_squared() * utils.cc \ref distance_to_segment_squared()
*/ */
void set_covers_threshold (double); void set_covers_threshold (double);

View file

@ -20,10 +20,10 @@
#ifndef __CANVAS_POLYGON_H__ #ifndef __CANVAS_POLYGON_H__
#define __CANVAS_POLYGON_H__ #define __CANVAS_POLYGON_H__
#include "canvas/visibility.h"
#include "canvas/poly_item.h"
#include "canvas/outline.h"
#include "canvas/fill.h" #include "canvas/fill.h"
#include "canvas/outline.h"
#include "canvas/poly_item.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
@ -38,7 +38,7 @@ public:
void compute_bounding_box () const; void compute_bounding_box () const;
bool covers (Duple const &) const; bool covers (Duple const &) const;
protected: protected:
mutable float* multiple; mutable float* multiple;
mutable float* constant; mutable float* constant;
mutable Points::size_type cached_size; mutable Points::size_type cached_size;

View file

@ -20,12 +20,13 @@
#define __timecode_time_h__ #define __timecode_time_h__
#include <cmath> #include <cmath>
#include <ostream>
#include <inttypes.h> #include <inttypes.h>
#include <ostream>
#include "temporal/visibility.h" #include "temporal/visibility.h"
namespace Timecode { namespace Timecode
{
enum Wrap { enum Wrap {
NONE = 0, NONE = 0,
@ -61,7 +62,8 @@ struct LIBTEMPORAL_API Time {
static double default_rate; ///< Rate to use for default constructor static double default_rate; ///< Rate to use for default constructor
bool drop; ///< Whether this Time uses dropframe Timecode bool drop; ///< Whether this Time uses dropframe Timecode
Time (double a_rate = default_rate) { Time (double a_rate = default_rate)
{
negative = false; negative = false;
hours = 0; hours = 0;
minutes = 0; minutes = 0;
@ -69,17 +71,19 @@ struct LIBTEMPORAL_API Time {
frames = 0; frames = 0;
subframes = 0; subframes = 0;
rate = a_rate; rate = a_rate;
drop = (lrintf(100.f * (float)a_rate) == (long)2997); drop = (lrintf (100.f * (float)a_rate) == (long)2997);
} }
bool operator== (const Time& other) const { bool operator== (const Time& other) const
{
return negative == other.negative && hours == other.hours && return negative == other.negative && hours == other.hours &&
minutes == other.minutes && seconds == other.seconds && minutes == other.minutes && seconds == other.seconds &&
frames == other.frames && subframes == other.subframes && frames == other.frames && subframes == other.subframes &&
rate == other.rate && drop == other.drop; rate == other.rate && drop == other.drop;
} }
std::ostream& print (std::ostream& ostr) const { std::ostream& print (std::ostream& ostr) const
{
if (negative) { if (negative) {
ostr << '-'; ostr << '-';
} }
@ -88,7 +92,6 @@ struct LIBTEMPORAL_API Time {
<< " @" << rate << (drop ? " drop" : " nondrop"); << " @" << rate << (drop ? " drop" : " nondrop");
return ostr; return ostr;
} }
}; };
Wrap LIBTEMPORAL_API increment (Time& timecode, uint32_t); Wrap LIBTEMPORAL_API increment (Time& timecode, uint32_t);
@ -103,43 +106,41 @@ void LIBTEMPORAL_API seconds_floor (Time& timecode);
void LIBTEMPORAL_API minutes_floor (Time& timecode); void LIBTEMPORAL_API minutes_floor (Time& timecode);
void LIBTEMPORAL_API hours_floor (Time& timecode); void LIBTEMPORAL_API hours_floor (Time& timecode);
double LIBTEMPORAL_API timecode_to_frames_per_second(TimecodeFormat const t); double LIBTEMPORAL_API timecode_to_frames_per_second (TimecodeFormat const t);
bool LIBTEMPORAL_API timecode_has_drop_frames(TimecodeFormat const t); bool LIBTEMPORAL_API timecode_has_drop_frames (TimecodeFormat const t);
std::string LIBTEMPORAL_API timecode_format_name (TimecodeFormat const t); std::string LIBTEMPORAL_API timecode_format_name (TimecodeFormat const t);
std::string LIBTEMPORAL_API timecode_format_time (Timecode::Time const timecode); std::string LIBTEMPORAL_API timecode_format_time (Timecode::Time const timecode);
std::string LIBTEMPORAL_API timecode_format_sampletime ( bool LIBTEMPORAL_API parse_timecode_format (std::string tc, Timecode::Time& TC);
std::string LIBTEMPORAL_API
timecode_format_sampletime (
int64_t sample, int64_t sample,
double sample_sample_rate, double sample_sample_rate,
double timecode_frames_per_second, bool timecode_drop_frames double timecode_frames_per_second, bool timecode_drop_frames);
);
bool LIBTEMPORAL_API parse_timecode_format(std::string tc, Timecode::Time &TC); void LIBTEMPORAL_API
timecode_to_sample (
void LIBTEMPORAL_API timecode_to_sample(
Timecode::Time& timecode, int64_t& sample, Timecode::Time& timecode, int64_t& sample,
bool use_offset, bool use_subframes, bool use_offset, bool use_subframes,
/* Note - framerate info is taken from Timecode::Time& */ /* Note - framerate info is taken from Timecode::Time& */
double sample_sample_rate /**< may include pull up/down */, double sample_sample_rate /**< may include pull up/down */,
uint32_t subframes_per_frame /**< must not be 0 if use_subframes==true */, uint32_t subframes_per_frame /**< must not be 0 if use_subframes==true */,
/* optional offset - can be improved: function pointer to lazily query this*/ /* optional offset - can be improved: function pointer to lazily query this*/
bool offset_is_negative, int64_t offset_samples bool offset_is_negative, int64_t offset_samples);
);
void LIBTEMPORAL_API sample_to_timecode ( void LIBTEMPORAL_API
sample_to_timecode (
int64_t sample, Timecode::Time& timecode, int64_t sample, Timecode::Time& timecode,
bool use_offset, bool use_subframes, bool use_offset, bool use_subframes,
/* framerate info */ /* framerate info */
double timecode_frames_per_second, double timecode_frames_per_second,
bool timecode_drop_frames, bool timecode_drop_frames,
double sample_sample_rate/**< can include pull up/down */, double sample_sample_rate /**< can include pull up/down */,
uint32_t subframes_per_frame, uint32_t subframes_per_frame,
/* optional offset - can be improved: function pointer to lazily query this*/ /* optional offset - can be improved: function pointer to lazily query this*/
bool offset_is_negative, int64_t offset_samples bool offset_is_negative, int64_t offset_samples);
);
} // namespace Timecode } // namespace Timecode