DirectFB - Home of the pragmatist Roadmap


[directfb-dev] Re: [PATCH] Add IDirectFBDisplayLayer::GetName
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-dev] Re: [PATCH] Add IDirectFBDisplayLayer::GetName



And naturally I forgot the patch...

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
Index: include/directfb.h
===================================================================
RCS file: /cvs/directfb/DirectFB/include/directfb.h,v
retrieving revision 1.158
diff -u -r1.158 directfb.h
--- include/directfb.h	21 Nov 2002 15:50:53 -0000	1.158
+++ include/directfb.h	4 Dec 2002 00:43:54 -0000
@@ -1393,6 +1393,14 @@
      );
 
      /*
+      * Get the layer name.
+      */
+     DFBResult (*GetName) (
+          IDirectFBDisplayLayer              *thiz,
+          char                              **layer_name
+     );
+
+     /*
       * Get a description of this display layer, i.e. the capabilities.
       */
      DFBResult (*GetDescription) (
Index: src/core/layers.c
===================================================================
RCS file: /cvs/directfb/DirectFB/src/core/layers.c,v
retrieving revision 1.85
diff -u -r1.85 layers.c
--- src/core/layers.c	29 Nov 2002 20:09:02 -0000	1.85
+++ src/core/layers.c	4 Dec 2002 00:44:02 -0000
@@ -923,6 +923,13 @@
      *desc = layer->shared->layer_info.desc;
 }
 
+void
+dfb_layer_name( const DisplayLayer  *layer,
+                char               **name )
+{
+     *name = layer->shared->layer_info.name;
+}
+
 DFBDisplayLayerID
 dfb_layer_id( const DisplayLayer *layer )
 {
Index: src/core/layers.h
===================================================================
RCS file: /cvs/directfb/DirectFB/src/core/layers.h,v
retrieving revision 1.41
diff -u -r1.41 layers.h
--- src/core/layers.h	22 Nov 2002 21:18:00 -0000	1.41
+++ src/core/layers.h	4 Dec 2002 00:44:02 -0000
@@ -283,6 +283,8 @@
 CardState         *dfb_layer_state( DisplayLayer *layer );
 void               dfb_layer_description( const DisplayLayer         *layer,
                                           DFBDisplayLayerDescription *desc );
+void               dfb_layer_name( const DisplayLayer  *layer,
+                                   char               **name );
 DFBDisplayLayerID  dfb_layer_id( const DisplayLayer *layer );
 
 DFBResult          dfb_layer_flip_buffers ( DisplayLayer        *layer,
Index: src/display/idirectfbdisplaylayer.c
===================================================================
RCS file: /cvs/directfb/DirectFB/src/display/idirectfbdisplaylayer.c,v
retrieving revision 1.43
diff -u -r1.43 idirectfbdisplaylayer.c
--- src/display/idirectfbdisplaylayer.c	18 Nov 2002 18:42:43 -0000	1.43
+++ src/display/idirectfbdisplaylayer.c	4 Dec 2002 00:44:15 -0000
@@ -111,6 +111,24 @@
 }
 
 static DFBResult
+IDirectFBDisplayLayer_GetName( IDirectFBDisplayLayer  *thiz,
+                               char                  **name )
+{
+     char *layer_name;
+
+     INTERFACE_GET_DATA(IDirectFBDisplayLayer)
+
+     if (!name)
+          return DFB_INVARG;
+
+     dfb_layer_name( data->layer, &layer_name );
+
+     *name = layer_name;
+
+     return DFB_OK;
+}
+
+static DFBResult
 IDirectFBDisplayLayer_GetDescription( IDirectFBDisplayLayer      *thiz,
                                       DFBDisplayLayerDescription *desc )
 {
@@ -586,6 +604,7 @@
      thiz->AddRef = IDirectFBDisplayLayer_AddRef;
      thiz->Release = IDirectFBDisplayLayer_Release;
      thiz->GetID = IDirectFBDisplayLayer_GetID;
+     thiz->GetName = IDirectFBDisplayLayer_GetName;
      thiz->GetDescription = IDirectFBDisplayLayer_GetDescription;
      thiz->GetSurface = IDirectFBDisplayLayer_GetSurface;
      thiz->SetCooperativeLevel = IDirectFBDisplayLayer_SetCooperativeLevel;

Home | Main Index | Thread Index


directfb.org / Development / Old Archives