gst_plugins_base/ext/pango/gsttextrender.h
changeset 0 0e761a78d257
equal deleted inserted replaced
-1:000000000000 0:0e761a78d257
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 #ifndef __GST_TEXT_RENDER_H__
       
    18 #define __GST_TEXT_RENDER_H__
       
    19 
       
    20 #include <gst/gst.h>
       
    21 #include <pango/pangoft2.h>
       
    22 
       
    23 G_BEGIN_DECLS
       
    24 
       
    25 #define GST_TYPE_TEXT_RENDER            (gst_text_render_get_type())
       
    26 #define GST_TEXT_RENDER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),\
       
    27                                         GST_TYPE_TEXT_RENDER, GstTextRender))
       
    28 #define GST_TEXT_RENDER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),\
       
    29                                         GST_TYPE_TEXT_RENDER, GstTextRenderClass))
       
    30 #define GST_TEXT_RENDER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),\
       
    31                                         GST_TYPE_TEXT_RENDER, GstTextRenderClass))
       
    32 #define GST_IS_TEXT_RENDER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),\
       
    33                                         GST_TYPE_TEXT_RENDER))
       
    34 #define GST_IS_TEXT_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\
       
    35                                         GST_TYPE_TEXT_RENDER))
       
    36 
       
    37 typedef struct _GstTextRender      GstTextRender;
       
    38 typedef struct _GstTextRenderClass GstTextRenderClass;
       
    39 
       
    40 /**
       
    41  * GstTextRender:
       
    42  *
       
    43  * Opaque textrender data structure.
       
    44  */
       
    45 struct _GstTextRender {
       
    46     GstElement            element;
       
    47 
       
    48     GstPad               *sinkpad, *srcpad;
       
    49     gint                  width;
       
    50     gint                  height;
       
    51     PangoLayout          *layout;
       
    52     FT_Bitmap             bitmap;
       
    53     gint                  bitmap_buffer_size;
       
    54     gint                  baseline_y;
       
    55 };
       
    56 
       
    57 struct _GstTextRenderClass {
       
    58     GstElementClass parent_class;
       
    59 
       
    60     PangoContext *pango_context;
       
    61 };
       
    62 
       
    63 GType gst_text_render_get_type(void) G_GNUC_CONST;
       
    64 
       
    65 G_END_DECLS
       
    66 
       
    67 #endif /* __GST_TEXT_RENDER_H */