WebCore/css/MediaFeatureNames.h
changeset 0 4f2f89ce4247
child 2 303757a437d3
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2  * Copyright (C) 2005 Apple Computer, Inc.
       
     3  *
       
     4  * This library is free software; you can redistribute it and/or
       
     5  * modify it under the terms of the GNU Library General Public
       
     6  * License as published by the Free Software Foundation; either
       
     7  * version 2 of the License, or (at your option) any later version.
       
     8  *
       
     9  * This library is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12  * Library General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU Library General Public License
       
    15  * along with this library; see the file COPYING.LIB.  If not, write to
       
    16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    17  * Boston, MA 02110-1301, USA.
       
    18  *
       
    19  */
       
    20 #ifndef MediaFeatureNames_h
       
    21 #define MediaFeatureNames_h
       
    22 
       
    23 #include "AtomicString.h"
       
    24 
       
    25 namespace WebCore {
       
    26     namespace MediaFeatureNames {
       
    27 
       
    28 #if ENABLE(WIDGETS_10_SUPPORT)
       
    29 #define CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro) \
       
    30     macro(view_mode, "-webkit-view-mode")
       
    31 #else
       
    32 #define CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro)
       
    33 #endif
       
    34 
       
    35 #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \
       
    36     macro(color, "color") \
       
    37     macro(grid, "grid") \
       
    38     macro(monochrome, "monochrome") \
       
    39     macro(height, "height") \
       
    40     macro(width, "width") \
       
    41     macro(orientation, "orientation") \
       
    42     macro(aspect_ratio, "aspect-ratio") \
       
    43     macro(device_aspect_ratio, "device-aspect-ratio") \
       
    44     macro(device_pixel_ratio, "-webkit-device-pixel-ratio") \
       
    45     macro(device_height, "device-height") \
       
    46     macro(device_width, "device-width") \
       
    47     macro(max_color, "max-color") \
       
    48     macro(max_aspect_ratio, "max-aspect-ratio") \
       
    49     macro(max_device_aspect_ratio, "max-device-aspect-ratio") \
       
    50     macro(max_device_pixel_ratio, "-webkit-max-device-pixel-ratio") \
       
    51     macro(max_device_height, "max-device-height") \
       
    52     macro(max_device_width, "max-device-width") \
       
    53     macro(max_height, "max-height") \
       
    54     macro(max_monochrome, "max-monochrome") \
       
    55     macro(max_width, "max-width") \
       
    56     macro(min_color, "min-color") \
       
    57     macro(min_aspect_ratio, "min-aspect-ratio") \
       
    58     macro(min_device_aspect_ratio, "min-device-aspect-ratio") \
       
    59     macro(min_device_pixel_ratio, "-webkit-min-device-pixel-ratio") \
       
    60     macro(min_device_height, "min-device-height") \
       
    61     macro(min_device_width, "min-device-width") \
       
    62     macro(min_height, "min-height") \
       
    63     macro(min_monochrome, "min-monochrome") \
       
    64     macro(min_width, "min-width") \
       
    65     macro(transform_2d, "-webkit-transform-2d") \
       
    66     macro(transform_3d, "-webkit-transform-3d") \
       
    67     macro(transition, "-webkit-transition") \
       
    68     macro(animation, "-webkit-animation") \
       
    69     CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro)
       
    70 
       
    71 // end of macro
       
    72 
       
    73 #ifndef CSS_MEDIAQUERY_NAMES_HIDE_GLOBALS
       
    74     #define CSS_MEDIAQUERY_NAMES_DECLARE(name, str) extern const AtomicString name##MediaFeature;
       
    75     CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(CSS_MEDIAQUERY_NAMES_DECLARE)
       
    76     #undef CSS_MEDIAQUERY_NAMES_DECLARE
       
    77 #endif
       
    78 
       
    79         void init();
       
    80 
       
    81     } // namespace MediaFeatureNames
       
    82 } // namespace WebCore
       
    83 
       
    84 #endif // MediaFeatureNames_h