Changes between Version 11 and Version 12 of EFLWebKitCodingStyle
- Timestamp:
- Aug 13, 2012, 7:44:42 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EFLWebKitCodingStyle
v11 v12 17 17 === Public APIs === 18 18 {{{ 19 #!cpp 19 20 EAPI void ewk_view_bg_color_set(Evas_Object *o, int r, int g, int b, int a); 20 21 }}} … … 22 23 === Implementation === 23 24 {{{ 25 #!cpp 24 26 void ewk_view_bg_color_set(Evas_Object* ewkView, int red, int green, int blue, int alpha) 25 27 { … … 42 44 === Public APIs === 43 45 {{{ 46 #!cpp 44 47 EAPI Eina_Bool ewk_view_scale_set(Evas_Object *o, float scale_factor, Evas_Coord cx, Evas_Coord cy); 45 48 }}} … … 47 50 === Implementation === 48 51 {{{ 52 #!cpp 49 53 Eina_Bool ewk_view_scale_set(Evas_Object* ewkView, float scaleFactor, Evas_Coord centerX, Evas_Coord centerY) 50 54 { … … 68 72 === Right === 69 73 {{{ 74 #!cpp 70 75 EAPI Ewk_Context *ewk_context_new(void); 71 76 }}} … … 73 78 === Wrong === 74 79 {{{ 80 #!cpp 75 81 EAPI Ewk_Context *ewk_context_new(); 76 82 }}} … … 79 85 === Right === 80 86 {{{ 87 #!cpp 81 88 static void _ewk_view_smart_show(Evas_Object* ewkView) 82 89 }}} … … 84 91 === Wrong === 85 92 {{{ 93 #!cpp 86 94 static void _ewk_view_smart_show(Evas_Object *ewkView) 87 95 }}} … … 90 98 === Right === 91 99 {{{ 100 #!cpp 92 101 Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data); 93 102 }}} … … 95 104 === Wrong === 96 105 {{{ 106 #!cpp 97 107 Ewk_View_Smart_Data* smartData = (Ewk_View_Smart_Data*)data; 98 108 }}} … … 101 111 === Right === 102 112 {{{ 113 #!cpp 103 114 RefPtr<cairo_region_t> dirtyRegion = adoptRef(cairo_region_create_rectangle(&rect)); 104 115 … … 109 120 === Wrong === 110 121 {{{ 122 #!cpp 111 123 cairo_region_t* dirtyRegion = cairo_region_create_rectangle(&rect); 112 124 ... … … 124 136 Where it is not possible to use smart pointers. Use new/delete operators. 125 137 {{{ 138 #!cpp 126 139 unusedCacheEntry = new Ewk_Tile_Unused_Cache_Entry; 127 140 ... … … 130 143 === Wrong === 131 144 {{{ 145 #!cpp 132 146 unusedCacheEntry = static_cast<Ewk_Tile_Unused_Cache_Entry*>(malloc(sizeof(Ewk_Tile_Unused_Cache_Entry))); 133 147 ... … … 138 152 === Right === 139 153 {{{ 154 #!cpp 140 155 const int defaultTileWidth = 256; 141 156 const int defaultTileHeigth = 256; … … 143 158 === Wrong === 144 159 {{{ 160 #!cpp 145 161 #define DEFAULT_TILE_W (256) 146 162 #define DEFAULT_TILE_H (256) … … 150 166 === Right === 151 167 {{{ 168 #!cpp 152 169 /** 153 170 * Query action for this intent. … … 161 178 === Wrong === 162 179 {{{ 180 #!cpp 163 181 /** 164 182 * Query action for this intent. … … 194 212 === Right === 195 213 {{{ 196 struct { 214 #!cpp 215 struct _Ewk_View_Private_Data { 197 216 ... 198 217 Eina_Bool pageCache : 1; 199 ...200 218 } 201 219 … … 214 232 === Wrong === 215 233 {{{ 234 #!cpp 216 235 Eina_Bool ewk_settings_auto_load_images_set(Ewk_Settings* settings, Eina_Bool automatic) 217 236 {