revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / gallium / createpipescreen.c
blob7df7c8833282e588a36f0b26f35509e0f3151c2b
1 /*
2 Copyright © 2010-2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define DEBUG 1
7 #include <aros/debug.h>
9 #include <proto/utility.h>
10 #include <proto/intuition.h>
12 #include <hidd/gfx.h>
14 #include <stdio.h>
16 #include "gallium_intern.h"
18 #undef HiddGalliumAttrBase
19 #define HiddGalliumAttrBase GB(GalliumBase)->galliumAttrBase
21 /*****************************************************************************
23 NAME */
25 AROS_LH1(struct pipe_screen *, CreatePipeScreen,
27 /* SYNOPSIS */
28 AROS_LHA(PipeHandle_t, pipe, A0),
30 /* LOCATION */
31 struct Library *, GalliumBase, 7, Gallium)
33 /* FUNCTION
34 Creates a gallium pipe screen.
36 INPUTS
37 pipe - a pipe handle created using CreatePipe().
39 RESULT
40 A valid pipe screen instance or NULL if creation was not successful.
42 BUGS
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 struct pHidd_Gallium_CreatePipeScreen cpsmsg;
51 struct pipe_screen *screen = NULL;
53 if (pipe)
55 D(bug("[gallium.library] %s: creating pipe_screen...\n", __PRETTY_FUNCTION__));
57 cpsmsg.mID = OOP_GetMethodID(IID_Hidd_Gallium, moHidd_Gallium_CreatePipeScreen);
58 screen = (struct pipe_screen *)OOP_DoMethod((OOP_Object *)pipe, (OOP_Msg)&cpsmsg);
60 else
62 bug("[gallium.library] no pipe specified!\n");
65 return screen;
67 AROS_LIBFUNC_EXIT