Alp attached is my patch to remove X11 refs if you building for gtk/directfb.
Its not quite right since you have the case of X11/GTK on Windows thats not dealt with. I think some more changes are needed in the headers to build that variant. It adds PLATFORM(X11) and PLATFORM(DIRECTFB) I need the DIRECTFB one later for my movie backend using directfb video providers. Which I need to submit. I don't think the GStreamer backend has to be gtk specific. We should be able to do a variety of bindings that are generic. On Feb 13, 2008 7:29 AM, Mike Emmel <[EMAIL PROTECTED]> wrote: > So should defaultOptions be set to something sane or is nulls ok ? > > I think the real problem is the above screen resolution issue but I'm > not sure about > the interaction between screen scaling and the base font options. It > seems to me we don't want to allow fonts to scale below a certain size > ? > > On a side note we should add get/setDefaultOptions and the above code > should move into the webkit binding layer. > > Also the same for dpi I think it should be up in the app and we push > the value down > via get/setScreenResolution. > > This approach decouples the cairo/font code from gtk so it can be used > for other ports. > > > > > > > On Feb 13, 2008 3:27 AM, Alp Toker <[EMAIL PROTECTED]> wrote: > > Christian Dywan wrote: > > > > > > While that might fix the problem, hardcoding arbitrary values is not > > > exactly advisable. > > > > > > It should be interesting to figure out what causes this function to fail > > > in the first place. > > > > > > > The answer lies in the documentation for gdk_screen_get_resolution(): > > > > Returns: the current resolution, or -1 if no resolution has been set. > > > > So Sriram's patch is absolutely correct (coding-style issues aside). > > > > _______________________________________________ > > webkit-dev mailing list > > webkit-dev@lists.webkit.org > > http://lists.webkit.org/mailman/listinfo/webkit-dev > > >
diff --git a/GNUmakefile.am b/GNUmakefile.am index 054265a..66f9233 100644 --- a/GNUmakefile.am +++ b/GNUmakefile.am @@ -200,6 +200,12 @@ endif if TARGET_X11 global_cppflags += -DXP_UNIX +global_cppflags += -DBUILDING_X11__ +endif + +if TARGET_DIRECTFB +global_cppflags += -DXP_UNIX +global_cppflags += -DBUILDING_DIRECTFB__ endif if !ENABLE_DEBUG diff --git a/JavaScriptCore/bindings/npapi.h b/JavaScriptCore/bindings/npapi.h index ba8b6c7..c1581b1 100644 --- a/JavaScriptCore/bindings/npapi.h +++ b/JavaScriptCore/bindings/npapi.h @@ -86,9 +86,11 @@ #include <OpenGL/OpenGL.h> #endif -#ifdef XP_UNIX +#ifdef XP_UNIX +#if PLATFORM(X11) #include <X11/Xlib.h> #include <X11/Xutil.h> +#endif #include <stdio.h> #endif @@ -247,11 +249,13 @@ typedef struct typedef struct { +#if PLATFORM(X11) int32 type; Display* display; Visual* visual; Colormap colormap; unsigned int depth; +#endif } NPSetWindowCallbackStruct; typedef struct @@ -449,9 +453,13 @@ typedef struct _NPEvent uint32 lParam; } NPEvent; #elif defined (XP_UNIX) +#if PLATFORM(X11) typedef XEvent NPEvent; #else typedef void* NPEvent; +#endif +#else +typedef void* NPEvent; #endif /* XP_MAC */ #if defined(XP_MAC) @@ -470,9 +478,13 @@ typedef CGPathRef NPCGRegion; #elif defined(XP_WIN) typedef HRGN NPRegion; #elif defined(XP_UNIX) +#if PLATFORM(X11) typedef Region NPRegion; #else typedef void *NPRegion; +#endif /*PLATFORM(X11)*/ +#else +typedef void *NPRegion; #endif /* XP_MAC */ #ifdef XP_MACOSX diff --git a/JavaScriptCore/bindings/npruntime_internal.h b/JavaScriptCore/bindings/npruntime_internal.h index f5357cd..83655d2 100644 --- a/JavaScriptCore/bindings/npruntime_internal.h +++ b/JavaScriptCore/bindings/npruntime_internal.h @@ -27,9 +27,8 @@ #include "npruntime.h" -#ifdef XP_UNIX +#if PLATFORM(X11) #include <X11/Xresource.h> - #undef None #undef Above #undef Below @@ -37,3 +36,4 @@ #undef Complex #undef Status #endif + diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h index 5cde2fe..9a880c7 100644 --- a/JavaScriptCore/wtf/Platform.h +++ b/JavaScriptCore/wtf/Platform.h @@ -101,6 +101,14 @@ #define WTF_PLATFORM_WIN 1 #endif +#if defined(BUILDING_DIRECTFB__) +#define WTF_PLATFORM_DIRECTFB 1 +#endif + +#if defined(BUILDING_X11__) +#define WTF_PLATFORM_X11 1 +#endif + /* Graphics engines */ /* PLATFORM(CG) */ diff --git a/configure.ac b/configure.ac index 4bbb54d..34a5132 100644 --- a/configure.ac +++ b/configure.ac @@ -150,6 +150,7 @@ case "$with_webkit_target" in *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;; esac + AC_MSG_RESULT([$with_webkit_target])
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev