#define POSIX_FUNC_PTR_CAST(type, object) *((type*) &(object))
#endif // _POSIX_VERSION
-extern void c_stacktrace();
+extern void c_stacktrace(void);
enum {
PROP_0,
}
GnomeCanvasWaveViewCache*
-gnome_canvas_waveview_cache_new ()
+gnome_canvas_waveview_cache_new (void)
{
GnomeCanvasWaveViewCache *c;
gulong end;
};
-GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new ();
+GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new (void);
void gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache*);
void gnome_canvas_waveview_set_gradient_waveforms (int);
//cout << endl << "*** LINE CACHE MISS" << endl;
- bool inserted_last_time = true;
bool invalidated = false;
for (i = begin; i != end; ++i) {
++li;
line->property_color_rgba() = color;
- inserted_last_time = false; // don't search next time
// Use existing line, moving if necessary
} else if (!exhausted) {
Lines::iterator steal = _lines.end();
line->property_x2() = xpos;
line->property_color_rgba() = color;
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true; // search next time
invalidated = true;
// Shift clean range left
//cout << "*** EXISTING LINE" << endl;
li = existing;
li->second->property_color_rgba() = color;
- inserted_last_time = false; // don't search next time
} else {
//cout << "*** MOVING LINE" << endl;
const double x1 = line->property_x1();
line->property_x1() = xpos;
line->property_x2() = xpos;
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true; // search next time
}
}
line->property_y2() = _height;
line->property_color_rgba() = color;
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true;
}
// Steal from the left
line->property_x1() = xpos;
line->property_x2() = xpos;
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true; // search next time
invalidated = true;
// Shift clean range right
: m;
// Now merge MIDI and any transport events into the buffer
- LV2_Evbuf_Iterator i = lv2_evbuf_end(_ev_buffers[port_index]);
const uint32_t type = LV2Plugin::urids.midi_MidiEvent;
const framepos_t tend = _session.transport_frame() + nframes;
++metric_i;
/* ensures that the timer is running */
static void
-start_timer ()
+start_timer (void)
{
if (animation_timer_id == 0)
animation_timer_id = g_timeout_add (ANIMATION_DELAY, animation_timeout_handler, NULL);
/* ensures that the timer is stopped */
static void
-stop_timer ()
+stop_timer (void)
{
if (animation_timer_id != 0)
{
}
static void
-disconnect_all_signals ()
+disconnect_all_signals (void)
{
GSList * item = connected_widgets;
while (item != NULL)
static gint
find_signal_info (gconstpointer signal_info, gconstpointer widget)
{
- if (((SignalInfo*)signal_info)->widget == widget)
+ if (((const SignalInfo*)signal_info)->widget == widget)
return 0;
else
return 1;
/* cleans up all resources of the animation system */
void
-clearlooks_animation_cleanup ()
+clearlooks_animation_cleanup (void)
{
disconnect_all_signals ();
GE_INTERNAL void clearlooks_animation_connect_checkbox (GtkWidget *widget);
GE_INTERNAL gboolean clearlooks_animation_is_animated (GtkWidget *widget);
GE_INTERNAL gdouble clearlooks_animation_elapsed (gpointer data);
-GE_INTERNAL void clearlooks_animation_cleanup ();
+GE_INTERNAL void clearlooks_animation_cleanup (void);
#endif /* HAVE_ANIMATION */
int x, int y, int width, int height)
{
const CairoColor *border = frame->border;
- const CairoColor *dark = (CairoColor*)&colors->shade[4];
+ const CairoColor *dark = (const CairoColor*)&colors->shade[4];
ClearlooksRectangle bevel_clip = {0, 0, 0, 0};
ClearlooksRectangle frame_clip = {0, 0, 0, 0};
double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
CairoColor border;
CairoColor s1, s2, s3, s4;
cairo_pattern_t *pattern;
- ShadowParameters shadow;
double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
ge_shade_color(&colors->shade[6], 1.05, &border);
cairo_stroke (cr);
cairo_translate (cr, 0.5, 0.5);
- shadow.shadow = CL_SHADOW_OUT;
- shadow.corners = corners;
- /*
- clearlooks_draw_highlight_and_shade (cr, &shadow,
- width,
- height, params->radius);*/
}
static void
{
const CairoColor *fill = &colors->bg[params->state_type];
int num_bars = 6; /* shut up gcc warnings */
- int bar_spacing;
switch (handle->type)
{
case CL_HANDLE_TOOLBAR:
num_bars = 6;
- bar_spacing = 3;
break;
case CL_HANDLE_SPLITTER:
num_bars = 16;
- bar_spacing = 3;
break;
}
cairo_pattern_t *pattern;
double radius;
- double strip_size;
radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM)
{
height += 3.0;
- strip_size = 2.0/height; /* 2 pixel high strip */
if (tab->gap_side == CL_GAP_TOP)
cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
else
{
width += 3.0;
- strip_size = 2.0/width;
if (tab->gap_side == CL_GAP_LEFT)
cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
const CairoColor *border = &colors->shade[7];
CairoColor fill, s1, s2, s4;
cairo_pattern_t *pattern;
- ShadowParameters shadow;
double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
if (scrollbar->horizontal)
cairo_stroke (cr);
cairo_translate (cr, 0.5, 0.5);
- shadow.shadow = CL_SHADOW_OUT;
- shadow.corners = corners;
}
static void
cairo_pattern_t *pattern;
double radius;
- double strip_size;
radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM)
{
height += 3.0;
- strip_size = 2.0/height; /* 2 pixel high strip */
if (tab->gap_side == CL_GAP_TOP)
cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
else
{
width += 3.0;
- strip_size = 2.0/width;
if (tab->gap_side == CL_GAP_LEFT)
cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
CairoColor fill;
CairoColor shade1, shade2, shade3;
cairo_pattern_t *pattern;
- ShadowParameters shadow;
double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
if (scrollbar->horizontal)
cairo_stroke (cr);
cairo_translate (cr, 0.5, 0.5);
- shadow.shadow = CL_SHADOW_OUT;
- shadow.corners = corners;
}
static void
const WidgetParameters *widget,
int x, int y, int width, int height)
{
- CairoColor *fill = (CairoColor*)&colors->spot[1];
+ const CairoColor *fill = &colors->spot[1];
CairoColor fill_shade;
CairoColor border = colors->spot[2];
cairo_pattern_t *pattern;
ge_shade_color (fill, 1.3, &hilight);
- /* Draw highlight */
- if (!params->active)
- {
- ShadowParameters shadow;
-
- shadow.shadow = CL_SHADOW_OUT;
- shadow.corners = params->corners;
- /*
- clearlooks_draw_highlight_and_shade (cr, colors, &shadow,
- width,
- height, radius);*/
- }
-
if (params->active)
{
pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-1 : 0,
CairoColor border;
CairoColor s1, s2, s3;
cairo_pattern_t *pattern;
- ShadowParameters shadow;
double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
ge_shade_color(&colors->shade[6], 1.05, &border);
cairo_stroke (cr);
cairo_translate (cr, 0.5, 0.5);
- shadow.shadow = CL_SHADOW_OUT;
- shadow.corners = corners;
- /*
- clearlooks_draw_highlight_and_shade (cr, &shadow,
- width,
- height, params->radius);*/
}
static void
else if (DETAIL ("button") || DETAIL ("buttondefault"))
{
WidgetParameters params;
- ShadowParameters shadow = { CR_CORNER_ALL, CL_SHADOW_NONE } ;
clearlooks_set_widget_parameters (widget, style, state_type, ¶ms);
if (ge_is_in_combo_box(widget))
params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT;
else
params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT;
-
- shadow.shadow = CL_SHADOW_IN;
if (params.xthickness > 2)
{
if (params.ltr)
x--;
width++;
- }
+ }
}
else
{
params.corners = CR_CORNER_ALL;
/* if (!(ge_is_combo_box (widget, FALSE))) */
params.enable_glow = TRUE;
- }
-
+ }
+
if (GE_IS_TOGGLE_BUTTON (widget) &&
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
params.active = TRUE;
Gdk::Color c;
Widget* parent;
- gint x1=0, x2=0, y1=0, y2=0;
+ gint x1=0, x2=0, y2=0;
gint w, h;
double fract, radius;
float r, g, b;
h = darea.get_height();
x1 = (gint) floor (w * fract);
x2 = x1;
- y1 = 0;
y2 = h - 1;
if (use_parent) {
#include <gtkmm2ext/gtkapplication.h>
int
-gtk_application_init ()
+gtk_application_init (void)
{
return 0;
}
-void gtk_application_cleanup ()
+void gtk_application_cleanup (void)
{
}
}
void
-gtk_application_ready ()
+gtk_application_ready (void)
{
}
typedef struct _GtkApplicationMenuGroup GtkApplicationMenuGroup;
-int gtk_application_init ();
-void gtk_application_ready ();
-void gtk_application_cleanup ();
+int gtk_application_init (void);
+void gtk_application_ready (void);
+void gtk_application_cleanup (void);
void gtk_application_set_menu_bar (GtkMenuShell *menu_shell);
GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void);
CairoColor* result = NULL;
gint i = 0;
double* _tmp0_;
- gint _hue_shift_size_;
- gint hue_shift_length1;
double* hue_shift;
double* _tmp1_;
- gint _color_shift_size_;
- gint color_shift_length1;
double* color_shift;
double m1 = 0.0;
double m2 = 0.0;
gint _tmp2_ = 0;
CairoColor* color;
g_return_val_if_fail (self != NULL, NULL);
- hue_shift = (_tmp0_ = g_new0 (double, 3), hue_shift_length1 = 3, _hue_shift_size_ = hue_shift_length1, _tmp0_);
- color_shift = (_tmp1_ = g_new0 (double, 3), color_shift_length1 = 3, _color_shift_size_ = color_shift_length1, _tmp1_);
+ hue_shift = (_tmp0_ = g_new0 (double, 3), _tmp0_);
+ color_shift = (_tmp1_ = g_new0 (double, 3), _tmp1_);
if (self->priv->_lightness <= 0.5) {
m2 = self->priv->_lightness * (1 + self->priv->_saturation);
} else {
double r;
double g;
double b;
- double v;
gint hi = 0;
double f = 0.0;
double p = 0.0;
r = 0.0;
g = 0.0;
b = 0.0;
- v = self->priv->_value;
hi = (gint) prolooks_modula (floor (self->priv->_hue / 60.0), (double) 6);
f = (self->priv->_hue / 60.0) - floor (self->priv->_hue / 60.0);
p = self->priv->_value * (1.0 - self->priv->_saturation);
GdkPixbuf* prolooks_cairo_image_surface_to_pixbuf (cairo_surface_t* surface) {
GdkPixbuf* result = NULL;
guchar* _tmp0_;
- gint _knob_data_size_;
- gint knob_data_length1;
guchar* knob_data;
g_return_val_if_fail (surface != NULL, NULL);
if (cairo_image_surface_get_format (surface) != CAIRO_FORMAT_ARGB32) {
result = NULL;
return result;
}
- knob_data = (_tmp0_ = cairo_image_surface_get_data (surface), knob_data_length1 = -1, _knob_data_size_ = knob_data_length1, _tmp0_);
+ knob_data = (_tmp0_ = cairo_image_surface_get_data (surface), _tmp0_);
{
gint i;
i = 0;
return fast_log2(val) / 3.312500f;
}
-static inline float minus_infinity() { return -HUGE_VAL; }
+static inline float minus_infinity(void) { return -HUGE_VAL; }
#endif /* __pbd_fastlog_h__ */
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
-#define XML_VERSION "1.0"
+xmlChar* xml_version = xmlCharStrdup("1.0");
using namespace std;
int result;
xmlKeepBlanksDefault(0);
- doc = xmlNewDoc((xmlChar*) XML_VERSION);
+ doc = xmlNewDoc(xml_version);
xmlSetDocCompressMode(doc, _compression);
writenode(doc, _root, doc->children, 1);
result = xmlSaveFormatFileEnc(_filename.c_str(), doc, "UTF-8", 1);
XMLNodeList children;
xmlKeepBlanksDefault(0);
- doc = xmlNewDoc((xmlChar*) XML_VERSION);
+ doc = xmlNewDoc(xml_version);
xmlSetDocCompressMode(doc, _compression);
writenode(doc, _root, doc->children, 1);
xmlDebugDumpDocument (out, doc);
XMLNodeList children;
xmlKeepBlanksDefault(0);
- doc = xmlNewDoc((xmlChar*) XML_VERSION);
+ doc = xmlNewDoc(xml_version);
xmlSetDocCompressMode(doc, _compression);
writenode(doc, _root, doc->children, 1);
xmlDocDumpMemory(doc, (xmlChar **) & ptr, &len);
xmlDocPtr doc = 0;
if (node) {
- doc = xmlNewDoc((xmlChar*) XML_VERSION);
+ doc = xmlNewDoc(xml_version);
writenode(doc, node, doc->children, 1);
ctxt = xmlXPathNewContext(doc);
} else {
xmlAttrPtr attr;
if (node->name) {
- name = (char*)node->name;
+ name = (const char*)node->name;
}
tmp = new XMLNode(name);
if (attr->children) {
content = (char*)attr->children->content;
}
- tmp->add_property((char*)attr->name, content);
+ tmp->add_property((const char*)attr->name, content);
}
if (node->content) {
xmlNodePtr node;
if (root) {
- node = doc->children = xmlNewDocNode(doc, 0, (xmlChar*) n->name().c_str(), 0);
+ node = doc->children = xmlNewDocNode(doc, 0, (const xmlChar*) n->name().c_str(), 0);
} else {
- node = xmlNewChild(p, 0, (xmlChar*) n->name().c_str(), 0);
+ node = xmlNewChild(p, 0, (const xmlChar*) n->name().c_str(), 0);
}
if (n->is_content()) {
props = n->properties();
for (curprop = props.begin(); curprop != props.end(); ++curprop) {
- xmlSetProp(node, (xmlChar*) (*curprop)->name().c_str(), (xmlChar*) (*curprop)->value().c_str());
+ xmlSetProp(node, (const xmlChar*) (*curprop)->name().c_str(), (const xmlChar*) (*curprop)->value().c_str());
}
children = n->children();
class Meter;
class SurfacePort;
-struct StripControlDefinition {
- const char* name;
- uint32_t base_id;
- Control* (*factory)(Surface&, int index, const char* name, Group&);
-};
-
struct GlobalControlDefinition {
const char* name;
- uint32_t id;
+ int id;
Control* (*factory)(Surface&, int index, const char* name, Group&);
const char* group_name;
};