1117N/A/*
1208N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
1117N/A *
1117N/A * Permission is hereby granted, free of charge, to any person obtaining a
1117N/A * copy of this software and associated documentation files (the "Software"),
1117N/A * to deal in the Software without restriction, including without limitation
1117N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1117N/A * and/or sell copies of the Software, and to permit persons to whom the
1117N/A * Software is furnished to do so, subject to the following conditions:
1117N/A *
1117N/A * The above copyright notice and this permission notice (including the next
1117N/A * paragraph) shall be included in all copies or substantial portions of the
1117N/A * Software.
1117N/A *
1117N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1117N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1117N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1117N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1117N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1117N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1117N/A * DEALINGS IN THE SOFTWARE.
1117N/A */
1117N/A
1117N/A/*
1117N/A * fbc - Common fbconf_xorg(1M) definitions
1117N/A */
1117N/A
1117N/A#ifndef _FBC_H
1117N/A#define _FBC_H
1117N/A
1117N/A
1117N/A/*
1117N/A * Boolean data type (mapped onto int)
1117N/A */
1117N/A#ifndef FALSE
1117N/A#define FALSE (0 != 0) /* Boolean False */
1117N/A#endif
1117N/A#ifndef TRUE
1117N/A#define TRUE (!FALSE) /* Boolean True */
1117N/A#endif
1117N/A
1117N/A/*
1117N/A * Current API version used between fbconf_xorg(1M) and libSUNW*_conf.so
1117N/A */
1117N/Atypedef unsigned long fbc_api_ver_t; /* fbconf_xorg(1M) API version type */
1117N/A
1117N/A#define FBC_API_VERSION ((fbc_api_ver_t)(1)) /* fbconf_xorg(1M) API version */
1117N/A
1117N/A#define FBC_API_VERSION_FMT "%s_api_version" /* API version symbol format */
1117N/A
1117N/A/*
1117N/A * Home directory for fbconfig software
1117N/A */
1117N/A#define FBC_LIB_DIR "/usr/lib/fbconfig" /* fbconfig software dir */
1117N/A#define FBC_LIB_NAME_FMT "lib%s_conf.so"
1117N/A#define FBC_LIB_PATH_FMT FBC_LIB_DIR "/" FBC_LIB_NAME_FMT
1117N/A
1117N/A/*
1117N/A * Frame buffer device file names (/dev/fb, /dev/fbs/[a-z]fb[0-9][ab]?)
1117N/A */
1117N/A#define FBC_DEVICE_SYMLINK_DIR "/dev" /* Device symlink directory */
1117N/A#define FBC_DEVICE_SYMLINK_NAME "fb" /* Device symlink name */
1117N/A#define FBC_DEVICE_SYMLINK_NAME_0 \
1117N/A FBC_DEVICE_SYMLINK_NAME "0"
1117N/A#define FBC_DEVICE_SYMLINK_PATH \
1117N/A FBC_DEVICE_SYMLINK_DIR "/" FBC_DEVICE_SYMLINK_NAME
1117N/A#define FBC_DEVICE_SYMLINK_PATH_0 \
1117N/A FBC_DEVICE_SYMLINK_DIR "/" FBC_DEVICE_SYMLINK_NAME_0
1117N/A
1117N/A#define FBC_DEVICE_DIR "/dev/fbs" /* Graphics device directory */
1117N/A
1117N/A#define FBC_MAX_DEV_PATH_LEN 128 /* Max device pathname length */
1117N/A
1117N/A#define FBC_STREAM_SUFFIX_CHARS "ab" /* Device name stream suffix chars */
1117N/A#define FBC_MAX_STREAMS 2 /* Max streams supported */
1117N/A
1117N/A/*
1117N/A * Masks for stat_buf.st_rdev member (fbc_open_device(), fbc_open_master())
1117N/A */
1117N/A#define FBC_CLONE_MASK 0xFF00 /* Inverted to discard clone bits */
1117N/A#define FBC_MINOR_MASK 0xFFFF /* Inverted to get major/type bits */
1117N/A
1117N/A/*
1117N/A * Configuration file location (-file machine|system|<pathname>)
1117N/A */
1117N/A#define FBC_FILE_KEYWD_MACHINE "machine"
1117N/A#define FBC_FILE_PATH_MACHINE "/etc/X11/xorg.conf"
1117N/A
1117N/A#define FBC_FILE_KEYWD_SYSTEM "system"
1208N/A#define FBC_FILE_PATH_SYSTEM "/usr/lib/X11/xorg.conf"
1117N/A
1117N/A#define FBC_DEFAULT_CONFIG_LOC FBC_FILE_KEYWD_MACHINE /* "machine" */
1117N/A
1117N/A/*
1117N/A * New configuration file modes (644) and ownership (root.root)
1117N/A */
1117N/A#define FBC_CONFIG_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
1117N/A#define FBC_CONFIG_FILE_UID (0) /* root */
1117N/A#define FBC_CONFIG_FILE_GID (0) /* root */
1117N/A
1117N/A/*
1117N/A * Default gamma (-g) value
1117N/A */
1117N/A#define FBC_GAMMA_DEFAULT 2.22 /* ??? Officially defined where ??? */
1117N/A#define FBC_GAMMA_DEFAULT_STR "2.22"
1117N/A
1117N/A#define GAMMA_TABLE_EXT ".gamma" /* Packed gamma table file extension */
1117N/A
1117N/A
1117N/A/*
1117N/A * Video mode properties (from -res <video_mode>, xorg.conf, and/or EDID)
1117N/A */
1117N/A#define FBC_MAX_MODE_NAME_LEN 256 /* Max mode name length (arbitrary) */
1117N/A
1117N/Atypedef struct {
1117N/A const char *name; /* Ptr to video mode name string */
1117N/A int width; /* Horizontal addressable pixels */
1117N/A int height; /* Vertical addressable lines */
1117N/A int frequency; /* Vertical frequency */
1117N/A} fbc_video_mode_t;
1117N/A
1117N/A
1117N/A/*
1117N/A * Seconds of new video mode trial for the "-res <video-mode> try" option
1117N/A */
1117N/A#define FBC_TRIAL_TIME 10
1117N/A
1117N/A
1117N/A/*
1117N/A * Line indentation used with -prconf and -propt
1117N/A */
1117N/A#define FBC_PR_INDENT " " /* Four Spaces (columns) */
1117N/A#define FBC_PR_INDENT_LEN (sizeof(FBC_PR_INDENT) - 1) /* Columns (w/o Nul) */
1117N/A
1117N/A
1117N/A#endif /* _FBC_H */
1117N/A
1117N/A
1117N/A/* End of fbc.h */