DirectFB - Home of the pragmatist Roadmap


[directfb-dev] [PATCH] Move layer name to description
Mailing List archive

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

[directfb-dev] [PATCH] Move layer name to description



This patch moves the display layer name to the description and removes the
IDirectFBDisplayLayer::GetName() method. I don't think there were any
releases with GetName() so removing it should be safe.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
diff -urN DirectFB/gfxdrivers/ati128/ati128_overlay.c DirectFB/gfxdrivers/ati128/ati128_overlay.c
--- DirectFB/gfxdrivers/ati128/ati128_overlay.c	Fri Aug  2 22:01:45 2002
+++ DirectFB/gfxdrivers/ati128/ati128_overlay.c	Thu Dec 19 21:36:53 2002
@@ -93,8 +93,8 @@
      layer_info->desc.type = DLTF_VIDEO | DLTF_STILL_PICTURE;
 
      /* set name */
-     snprintf( layer_info->name,
-               DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "ATI128 Overlay" );
+     snprintf( layer_info->desc.name,
+               DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "ATI128 Overlay" );
 
      /* fill out the default configuration */
      default_config->flags       = DLCONF_WIDTH | DLCONF_HEIGHT |
diff -urN DirectFB/gfxdrivers/cyber5k/cyber5k.c DirectFB/gfxdrivers/cyber5k/cyber5k.c
--- DirectFB/gfxdrivers/cyber5k/cyber5k.c	Fri Oct 25 17:51:53 2002
+++ DirectFB/gfxdrivers/cyber5k/cyber5k.c	Thu Dec 19 21:37:13 2002
@@ -557,8 +557,8 @@
           return ret;
 
      /* set name */
-     snprintf(layer_info->name,
-              DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "CyberPro OSD");
+     snprintf(layer_info->desc.name,
+              DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "CyberPro OSD");
 
      /* add support for options */
      default_config->flags   |= DLCONF_OPTIONS;
diff -urN DirectFB/gfxdrivers/cyber5k/cyber5k_underlay.c DirectFB/gfxdrivers/cyber5k/cyber5k_underlay.c
--- DirectFB/gfxdrivers/cyber5k/cyber5k_underlay.c	Fri Oct 25 17:51:53 2002
+++ DirectFB/gfxdrivers/cyber5k/cyber5k_underlay.c	Thu Dec 19 21:37:37 2002
@@ -74,8 +74,8 @@
                              DLTF_BACKGROUND;
 
      /* set name */
-     snprintf( layer_info->name,
-               DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "CyberPro Underlay" );
+     snprintf( layer_info->desc.name,
+               DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "CyberPro Underlay" );
 
      /* fill out the default configuration */
      default_config->flags       = DLCONF_WIDTH | DLCONF_HEIGHT |
diff -urN DirectFB/gfxdrivers/matrox/matrox_bes.c DirectFB/gfxdrivers/matrox/matrox_bes.c
--- DirectFB/gfxdrivers/matrox/matrox_bes.c	Wed Dec 11 00:08:55 2002
+++ DirectFB/gfxdrivers/matrox/matrox_bes.c	Thu Dec 19 21:36:02 2002
@@ -130,8 +130,8 @@
      layer_info->desc.type = DLTF_GRAPHICS | DLTF_VIDEO | DLTF_STILL_PICTURE;
 
      /* set name */
-     snprintf( layer_info->name,
-               DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "Matrox Backend Scaler" );
+     snprintf( layer_info->desc.name,
+               DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "Matrox Backend Scaler" );
 
      /* fill out the default configuration */
      default_config->flags       = DLCONF_WIDTH | DLCONF_HEIGHT |
diff -urN DirectFB/gfxdrivers/matrox/matrox_crtc2.c DirectFB/gfxdrivers/matrox/matrox_crtc2.c
--- DirectFB/gfxdrivers/matrox/matrox_crtc2.c	Thu Dec 19 21:26:28 2002
+++ DirectFB/gfxdrivers/matrox/matrox_crtc2.c	Thu Dec 19 21:36:08 2002
@@ -129,8 +129,8 @@
      layer_info->desc.type = DLTF_GRAPHICS | DLTF_VIDEO | DLTF_STILL_PICTURE;
 
      /* set name */
-     snprintf( layer_info->name,
-               DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "Matrox CRTC2" );
+     snprintf( layer_info->desc.name,
+               DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "Matrox CRTC2" );
 
      /* fill out the default configuration */
      default_config->flags       = DLCONF_WIDTH | DLCONF_HEIGHT |
diff -urN DirectFB/gfxdrivers/matrox/matrox_spic.c DirectFB/gfxdrivers/matrox/matrox_spic.c
--- DirectFB/gfxdrivers/matrox/matrox_spic.c	Thu Dec 19 21:26:29 2002
+++ DirectFB/gfxdrivers/matrox/matrox_spic.c	Thu Dec 19 21:36:20 2002
@@ -94,8 +94,8 @@
      layer_info->desc.type = DLTF_GRAPHICS | DLTF_VIDEO | DLTF_STILL_PICTURE;
 
      /* set name */
-     snprintf( layer_info->name,
-               DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "Matrox CRTC2 Sub-Picture" );
+     snprintf( layer_info->desc.name,
+               DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "Matrox CRTC2 Sub-Picture" );
 
      /* fill out the default configuration */
      default_config->flags       = DLCONF_WIDTH | DLCONF_HEIGHT |
diff -urN DirectFB/gfxdrivers/neomagic/neo_overlay.c DirectFB/gfxdrivers/neomagic/neo_overlay.c
--- DirectFB/gfxdrivers/neomagic/neo_overlay.c	Wed Aug 14 20:18:16 2002
+++ DirectFB/gfxdrivers/neomagic/neo_overlay.c	Thu Dec 19 21:38:00 2002
@@ -79,8 +79,8 @@
      layer_info->desc.type = DLTF_VIDEO | DLTF_STILL_PICTURE;
 
      /* set name */
-     snprintf( layer_info->name,
-               DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "NeoMagic Overlay" );
+     snprintf( layer_info->desc.name,
+               DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "NeoMagic Overlay" );
 
      /* fill out the default configuration */
      default_config->flags       = DLCONF_WIDTH | DLCONF_HEIGHT |
diff -urN DirectFB/gfxdrivers/savage/savage_streams_old.c DirectFB/gfxdrivers/savage/savage_streams_old.c
--- DirectFB/gfxdrivers/savage/savage_streams_old.c	Wed Sep 11 17:27:48 2002
+++ DirectFB/gfxdrivers/savage/savage_streams_old.c	Thu Dec 19 21:39:10 2002
@@ -193,7 +193,7 @@
      layer_info->desc.type = DLTF_GRAPHICS | DLTF_VIDEO | DLTF_STILL_PICTURE;
      
      /* set name */
-     snprintf(layer_info->name, DFB_DISPLAY_LAYER_INFO_NAME_LENGTH,
+     snprintf(layer_info->desc.name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH,
               "Savage Secondary Stream");
      
      /* fill out the default configuration */
@@ -789,7 +789,7 @@
           return ret;
 
      /* set name */
-     snprintf(layer_info->name, DFB_DISPLAY_LAYER_INFO_NAME_LENGTH,
+     snprintf(layer_info->desc.name, DFB_DISPLAY_LAYER_DESC_NAME_LENGTH,
               "Savage Primary Stream");
 
      /* add support for options */
diff -urN DirectFB/include/directfb.h DirectFB/include/directfb.h
--- DirectFB/include/directfb.h	Wed Dec 18 13:50:10 2002
+++ DirectFB/include/directfb.h	Thu Dec 19 21:34:46 2002
@@ -857,7 +857,11 @@
 /*
  * Description of the display layer capabilities.
  */
+#define DFB_DISPLAY_LAYER_DESC_NAME_LENGTH   30
 typedef struct {
+     char                               name[DFB_DISPLAY_LAYER_DESC_NAME_LENGTH];
+                                                     /* Display layer name. */
+
      DFBDisplayLayerTypeFlags           type;        /* Classification of the
                                                         display layer. */
      DFBDisplayLayerCapabilities        caps;        /* Capability flags of
@@ -1395,14 +1399,6 @@
      DFBResult (*GetID) (
           IDirectFBDisplayLayer              *thiz,
           DFBDisplayLayerID                  *layer_id
-     );
-
-     /*
-      * Get a copy of the layer name. Caller should free it after use.
-      */
-     DFBResult (*GetName) (
-          IDirectFBDisplayLayer              *thiz,
-          char                              **layer_name
      );
 
      /*
diff -urN DirectFB/src/core/fbdev/fbdev.c DirectFB/src/core/fbdev/fbdev.c
--- DirectFB/src/core/fbdev/fbdev.c	Wed Dec 18 13:50:11 2002
+++ DirectFB/src/core/fbdev/fbdev.c	Thu Dec 19 21:39:52 2002
@@ -771,8 +771,8 @@
      layer_info->desc.type = DLTF_GRAPHICS;
 
      /* set name */
-     snprintf( layer_info->name,
-               DFB_DISPLAY_LAYER_INFO_NAME_LENGTH, "Primary Layer" );
+     snprintf( layer_info->desc.name,
+               DFB_DISPLAY_LAYER_DESC_NAME_LENGTH, "Primary Layer" );
 
      /* fill out default color adjustment */
      default_adj->flags      = DCAF_BRIGHTNESS | DCAF_CONTRAST | DCAF_SATURATION;
diff -urN DirectFB/src/core/layers.c DirectFB/src/core/layers.c
--- DirectFB/src/core/layers.c	Thu Dec 19 21:26:29 2002
+++ DirectFB/src/core/layers.c	Thu Dec 19 21:35:27 2002
@@ -939,13 +939,6 @@
      *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 )
 {
diff -urN DirectFB/src/core/layers.h DirectFB/src/core/layers.h
--- DirectFB/src/core/layers.h	Wed Dec 18 13:50:11 2002
+++ DirectFB/src/core/layers.h	Thu Dec 19 21:34:55 2002
@@ -36,14 +36,8 @@
 #include <directfb.h>
 #include <core/coretypes.h>
 
-#define DFB_DISPLAY_LAYER_INFO_NAME_LENGTH   30
-
 typedef struct {
      DFBDisplayLayerDescription  desc;  /* description of the layer's caps */
-
-     char                        name[DFB_DISPLAY_LAYER_INFO_NAME_LENGTH];
-                                        /* description set by driver */
-
 } DisplayLayerInfo;
 
 typedef struct {
@@ -288,8 +282,6 @@
 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,
diff -urN DirectFB/src/display/idirectfbdisplaylayer.c DirectFB/src/display/idirectfbdisplaylayer.c
--- DirectFB/src/display/idirectfbdisplaylayer.c	Sun Dec  8 11:28:05 2002
+++ DirectFB/src/display/idirectfbdisplaylayer.c	Thu Dec 19 21:35:15 2002
@@ -111,24 +111,6 @@
 }
 
 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 = strdup( layer_name );
-
-     return DFB_OK;
-}
-
-static DFBResult
 IDirectFBDisplayLayer_GetDescription( IDirectFBDisplayLayer      *thiz,
                                       DFBDisplayLayerDescription *desc )
 {
@@ -604,7 +586,6 @@
      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