* Introduced a monitor_info structure and means to let it be filled by the

accelerant (or the app_server via EDID info). It's still experimental
  API, and opinions are welcome.
* Moved BPrivateScreen into the BPrivate namespace.
* Rewrote Screen.h.
* Introduced a BScreen::GetMonitorInfo() method, and implemented it in the
  app server as well (ie. AS_GET_MONITOR_INFO).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22563 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-10-15 11:41:47 +00:00
parent 4ff2178120
commit c278448653
12 changed files with 220 additions and 123 deletions
+24 -2
View File
@@ -1,4 +1,4 @@
#if !defined(_ACCELERANT_H_)
#ifndef _ACCELERANT_H_
#define _ACCELERANT_H_
#include <BeBuild.h>
@@ -15,7 +15,7 @@ extern "C" {
typedef void * (*GetAccelerantHook)(uint32, void *);
_EXPORT void * get_accelerant_hook(uint32 feature, void *data);
void *get_accelerant_hook(uint32 feature, void *data);
enum {
/* initialization */
@@ -42,6 +42,7 @@ enum {
B_DPMS_MODE, /* required if driver supports DPMS */
B_SET_DPMS_MODE, /* required if driver supports DPMS */
B_GET_PREFERRED_DISPLAY_MODE, /* optional */
B_GET_MONITOR_INFO, /* optional */
B_GET_EDID_INFO, /* optional */
/* cursor managment */
@@ -121,6 +122,26 @@ typedef struct {
uint16 v_blank_max;
} display_timing_constraints;
// TODO: experimental API
typedef struct {
uint32 version;
char vendor[128];
char name[128];
char serial_number[128];
uint32 product_id;
struct {
uint16 week;
uint16 year;
} produced;
float width;
float height;
uint32 min_horizontal_frequency; // in kHz
uint32 max_horizontal_frequency;
uint32 min_vertical_frequency; // in Hz
uint32 max_vertical_frequency;
uint32 max_pixel_clock; // in kHz
} monitor_info;
enum { /* mode flags */
B_SCROLL = 1 << 0,
B_8_BIT_DAC = 1 << 1,
@@ -216,6 +237,7 @@ typedef uint32 (*dpms_capabilities)(void);
typedef uint32 (*dpms_mode)(void);
typedef status_t (*set_dpms_mode)(uint32 dpms_flags);
typedef status_t (*get_preferred_display_mode)(display_mode *preferredMode);
typedef status_t (*get_monitor_info)(monitor_info *info);
typedef status_t (*get_edid_info)(void *info, uint32 size, uint32 *_version);
typedef sem_id (*accelerant_retrace_semaphore)(void);