Blame ext/pango/gstclockoverlay.h

Packit 971217
/* GStreamer
Packit 971217
 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
Packit 971217
 * Copyright (C) <2005> Tim-Philipp Müller <tim@centricular.net>
Packit 971217
 *
Packit 971217
 * This library is free software; you can redistribute it and/or
Packit 971217
 * modify it under the terms of the GNU Library General Public
Packit 971217
 * License as published by the Free Software Foundation; either
Packit 971217
 * version 2 of the License, or (at your option) any later version.
Packit 971217
 *
Packit 971217
 * This library is distributed in the hope that it will be useful,
Packit 971217
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 971217
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 971217
 * Library General Public License for more details.
Packit 971217
 *
Packit 971217
 * You should have received a copy of the GNU Library General Public
Packit 971217
 * License along with this library; if not, write to the
Packit 971217
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 971217
 * Boston, MA 02110-1301, USA.
Packit 971217
 */
Packit 971217
Packit 971217
Packit 971217
#ifndef __GST_CLOCK_OVERLAY_H__
Packit 971217
#define __GST_CLOCK_OVERLAY_H__
Packit 971217
Packit 971217
#include "gstbasetextoverlay.h"
Packit 971217
Packit 971217
G_BEGIN_DECLS
Packit 971217
Packit 971217
#define GST_TYPE_CLOCK_OVERLAY \
Packit 971217
  (gst_clock_overlay_get_type())
Packit 971217
#define GST_CLOCK_OVERLAY(obj) \
Packit 971217
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CLOCK_OVERLAY,GstClockOverlay))
Packit 971217
#define GST_CLOCK_OVERLAY_CLASS(klass) \
Packit 971217
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CLOCK_OVERLAY,GstClockOverlayClass))
Packit 971217
#define GST_IS_CLOCK_OVERLAY(obj) \
Packit 971217
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CLOCK_OVERLAY))
Packit 971217
#define GST_IS_CLOCK_OVERLAY_CLASS(klass) \
Packit 971217
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CLOCK_OVERLAY))
Packit 971217
Packit 971217
typedef struct _GstClockOverlay GstClockOverlay;
Packit 971217
typedef struct _GstClockOverlayClass GstClockOverlayClass;
Packit 971217
Packit 971217
/**
Packit 971217
 * GstClockOverlay:
Packit 971217
 *
Packit 971217
 * Opaque clockoverlay data structure.
Packit 971217
 */
Packit 971217
struct _GstClockOverlay {
Packit 971217
  GstBaseTextOverlay textoverlay;
Packit 971217
  gchar         *format; /* as in strftime () */
Packit 971217
  gchar         *text;
Packit 971217
};
Packit 971217
Packit 971217
struct _GstClockOverlayClass {
Packit 971217
  GstBaseTextOverlayClass parent_class;
Packit 971217
};
Packit 971217
Packit 971217
GType gst_clock_overlay_get_type (void);
Packit 971217
Packit 971217
Packit 971217
/* This is a hack hat allows us to use nonliterals for strftime without
Packit 971217
 * triggering a warning from -Wformat-nonliteral. We need to allow this
Packit 971217
 * because we export the format string as a property of the element.
Packit 971217
 * For the inspiration of this and a discussion of why this is necessary,
Packit 971217
 * see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39438
Packit 971217
 */
Packit 971217
#ifdef __GNUC__
Packit 971217
#pragma GCC system_header
Packit 971217
static size_t my_strftime(char *s, size_t max, const char *format,
Packit 971217
                          const struct tm *tm)
Packit 971217
{
Packit 971217
  return strftime (s, max, format, tm);
Packit 971217
}
Packit 971217
#define strftime my_strftime
Packit 971217
#endif
Packit 971217
Packit 971217
Packit 971217
G_END_DECLS
Packit 971217
Packit 971217
#endif /* __GST_CLOCK_OVERLAY_H__ */
Packit 971217