Code Monkey home page Code Monkey logo

libx11's People

Contributors

arukuka avatar bioinfornatics avatar cybershadow avatar edmccard avatar faianca avatar flamaros avatar growlercab avatar ianwizard avatar john-colvin avatar martinnowak avatar philipwitte avatar rikkimax avatar schveiguy avatar skilion avatar walterbright avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libx11's Issues

Wrong XIValuatorState structure

Now it has follow declaration:

struct XIValuatorState{
int mask_len;
ubyte mask;
double* values;
}

mask should be a pointer.

Usefulness XI* macros

XISetMask
XIClearMask
XIMaskIsSet
XIMaskLen

These macros are strange templates with string argument. I thing they should be simple functions for example:

void XISetMask(ubyte[] mask, uint event) {
mask[event >> 3] |= 1 << (event & 7);
}

Xutils.h - XSizeHints is wrong size

Currently the structure looks like:

struct XSizeHints {
    c_long flags;
    int x, y;
    int width, height;
    int min_width, min_height;
    int max_width, max_height;
    int width_inc, height_inc;
    struct min_aspect {
        int x;
        int y;
    };
    struct max_aspect {
        int x;
        int y;
    };
    int base_width, base_height;
    int win_gravity;
}

Which, when tested is 64 bytes on 64bit Linux (DMD). The original C structure in Xutils.h however is 80 bytes on the same machine (GCC). That's because min_aspect/max_aspect are only type declarations. The D structure should look like:

struct XSizeHints {
    c_long flags;
    int x, y;
    int width, height;
    int min_width, min_height;
    int max_width, max_height;
    int width_inc, height_inc;

    struct aspect {
        int x, y;
    }

    aspect min_aspect, max_aspect;

    int base_width, base_height;
    int win_gravity;
}

There may be similar issues with other sub-struct types in Deimos/libX11, but I haven't searched for them yet.

Undefined identifier long64

I am on 32-bit ubuntu 11.04 and libX11 refuses to build at xlibint.d it says undefined identifier long64. I am using a completely vanilla version of dmd 2.058

Library is built wrong on OSX

Building a file which shows Hello World (hiworld.d) in Mac OS 10.7:

$ dmd hiworld.d -I'libX11' libX11/lib/libDX11-dmd.a 
ld: warning: ignoring file libX11/lib/libDX11-dmd.a, file was built for archive which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
  "_XCloseDisplay", referenced from:
      __Dmain in hiworld.o
  "_XMapWindow", referenced from:
      __Dmain in hiworld.o
  "_D6deimos3X114Xlib6XEvent6__initZ", referenced from:
      __Dmain in hiworld.o
  "_XOpenDisplay", referenced from:
      __Dmain in hiworld.o
  "_RootWindow", referenced from:
      __Dmain in hiworld.o
  "_XDrawString", referenced from:
      __Dmain in hiworld.o
  "_DefaultScreen", referenced from:
      __Dmain in hiworld.o
  "_BlackPixel", referenced from:
      __Dmain in hiworld.o
  "_DefaultGC", referenced from:
      __Dmain in hiworld.o
  "_WhitePixel", referenced from:
      __Dmain in hiworld.o
  "_XFillRectangle", referenced from:
      __Dmain in hiworld.o
  "_XCreateSimpleWindow", referenced from:
      __Dmain in hiworld.o
--- errorlevel 1
  "_XSelectInput", referenced from:
      __Dmain in hiworld.o
  "_XNextEvent", referenced from:
      __Dmain in hiworld.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Xproto.d deprecations with dmd 2.066.1

When building with dmd 2.0.66.1 I get the following errors:

deimos/X11/Xproto.d(967): Deprecation: variable deimos.X11.Xproto._xEvent.u.enterLeave.ELFlagFocus const field with initializer should be static, __gshared, or an enum

deimos/X11/Xproto.d(968): Deprecation: variable eimos.X11.Xproto._xEvent.u.enterLeave.ELFlagSameScreen const field with initializer should be static, __gshared, or an enum

Building with GDC gives 'unrecognized option' error.

Using gdc-4.6 from Ubuntu 11.10 repos.

$ make DC=gdc
Makefile:159: warning: overriding commands for target install' Makefile:156: warning: ignoring old commands for targetinstall'
gdc -O2 -fdeprecated -m64 -Xlinker-ldl -m64 -c deimos/X11/Xlib.d -obuild/deimos/X11/Xlib.o
gdc: error: unrecognized option โ€˜-Xlinker-ldlโ€™
make: *** [build/deimos/X11/Xlib.o] Error 1

Xproto type conflicts

In Xproto.d some types from X.d and Xatom.d are redefined using alias which causes conflicts.

This works in Xproto.h because the alias is a #define and the types are all #undef at the end of the include file.

The following snippet is from Xproto.d, which lists the conflicting types.

/* For the purpose of the structure definitions in this file,
we must redefine the following types in terms of Xmd.h's types, which may
include bit fields.  All of these are #undef'd at the end of this file,
restoring the definitions in X.h.  */

alias CARD32    Window;
alias CARD32    Drawable;
alias CARD32    Font;
alias CARD32    Pixmap;
alias CARD32    Cursor;
alias CARD32    Colormap;
alias CARD32    GContext;
alias CARD32    Atom;
alias CARD32    VisualID;
alias CARD32    Time;
alias CARD8     KeyCode;
alias CARD32    KeySym;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.