2 Copyright © 2010, The AROS Development Team. All rights reserved.
5 Desc: Set display driver notification callback
9 #include <aros/debug.h>
10 #include <graphics/driver.h>
12 #include <proto/utility.h>
14 #include "graphics_intern.h"
16 /*****************************************************************************
19 #include <proto/graphics.h>
21 AROS_LH2(void, SetDisplayDriverCallback
,
24 AROS_LHA(APTR
, callback
, A0
),
25 AROS_LHA(APTR
, userdata
, A1
),
28 struct GfxBase
*, GfxBase
, 108, Graphics
)
31 Specify a display driver notification callback.
33 The callback function is called using "C" calling convention and its
34 declaration should have a form:
36 APTR DriverNotify(APTR object, BOOL add, APTR userdata);
38 The function will be called upon display driver insertion and removal.
39 Upon insertion the parameters will be the following:
40 object - A pointer to a struct MonitorHandle for the new driver
41 add - TRUE, indicates driver insertion
42 userdata - User data originally passed to SetDisplayDriverCallback()
43 The function should return a pointer to opaque data object which will
44 be stored in the display driver handle structure.
46 Upon driver removal the parameters mean:
47 object - A pointer to opaque object returned by the callback when
49 add - FALSE, indicates driver removal.
50 userdata - User data originally passed to SetDisplayDriverCallback()
51 Callback return value is ignored in removal mode.
54 callback - A pointer to a function to call.
55 userdata - User-defined data, will be passed to the callback function
61 This function is private to AROS. Do not use it in any end-user software,
62 the specification may change at any moment.
75 *****************************************************************************/
79 CDD(GfxBase
)->DriverNotify
= callback
;
80 CDD(GfxBase
)->notify_data
= userdata
;