3 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_GL_COCOA_PRIVATE_H__
22 #define __GST_GL_COCOA_PRIVATE_H__
26 #include <Cocoa/Cocoa.h>
28 #include "gstglwindow_cocoa.h"
29 #include "gstglcontext_cocoa.h"
33 @interface AppThreadPerformer : NSObject {
34 GstGLWindowCocoa *m_cocoa;
35 GstGLWindowCB m_callback;
36 GstGLWindowResizeCB m_callback2;
41 - (id) init: (GstGLWindowCocoa *)window;
42 - (id) initWithCallback:(GstGLWindowCocoa *)window callback:(GstGLWindowCB)callback userData:(gpointer) data;
43 - (id) initWithSize: (GstGLWindowCocoa *)window callback:(GstGLWindowResizeCB)callback userData:(gpointer)data toSize:(NSSize)size;
44 - (id) initWithAll: (GstGLWindowCocoa *)window callback:(GstGLWindowCB)callback userData:(gpointer) data;
45 - (void) updateWindow;
52 struct _GstGLContextCocoaPrivate
54 NSOpenGLContext *gl_context;
55 NSOpenGLContext *external_gl_context;
60 /* =============================================================*/
62 /* GstGLNSOpenGLView declaration */
64 /* =============================================================*/
66 @interface GstGLNSOpenGLView: NSOpenGLView {
67 GstGLWindowCocoa *m_cocoa;
70 - (id) initWithFrame:(GstGLWindowCocoa *)window rect:(NSRect)contentRect
71 pixelFormat:(NSOpenGLPixelFormat *)fmt;
74 gboolean gst_gl_window_cocoa_create_window (GstGLWindowCocoa *window_cocoa);
78 #endif /* __GST_GL_COCOA_PRIVATE_H__ */