type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | void
X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags)
{
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
Display *display = videodata->display;
/* !!! FIXME: just dereference videodata below instead of copying to locals. */
Atom _NET_WM_STATE = videodata->_NET_WM_STATE;
/* Atom ... |
functions | Uint32
X11_GetNetWMState(_THIS, Window xwindow)
{
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
Display *display = videodata->display;
Atom _NET_WM_STATE = videodata->_NET_WM_STATE;
Atom _NET_WM_STATE_HIDDEN = videodata->_NET_WM_STATE_HIDDEN;
Atom _NET_WM_STATE_FOCUSED = videodata-... |
functions | else if (atoms[i] == _NET_WM_STATE_FOCUSED) {
flags |= SDL_WINDOW_INPUT_FOCUS;
} |
functions | else if (atoms[i] == _NET_WM_STATE_MAXIMIZED_VERT) {
maximized |= 1;
} |
functions | else if (atoms[i] == _NET_WM_STATE_MAXIMIZED_HORZ) {
maximized |= 2;
} |
functions | else if ( atoms[i] == _NET_WM_STATE_FULLSCREEN) {
fullscreen = 1;
} |
functions | int
SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created)
{
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
SDL_WindowData *data;
int numwindows = videodata->numwindows;
int windowlistlength = videodata->windowlistlength;
SDL_WindowData **windowlist = videodata->windowl... |
functions | X_HAVE_UTF8_STRING
if (SDL_X11_HAVE_UTF8 && videodata->im) {
data->ic =
X11_XCreateIC(videodata->im, XNClientWindow, w, XNFocusWindow, w,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
NULL);
} |
functions | void
SetWindowBordered(Display *display, int screen, Window window, SDL_bool border)
{
/*
* this code used to check for KWM_WIN_DECORATION, but KDE hasn't
* supported it for years and years. It now respects _MOTIF_WM_HINTS.
* Gnome is similar: just use the Motif atom.
*/
Atom WM_HINTS = X... |
functions | int
X11_CreateWindow(_THIS, SDL_Window * window)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
SDL_DisplayData *displaydata =
(SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
SDL_WindowData *windowdata;
Display *display = data->display;
int screen = displaydata... |
functions | else if (window->flags & SDL_WINDOW_TOOLTIP) {
wintype_name = "_NET_WM_WINDOW_TYPE_TOOLTIP";
} |
functions | else if (window->flags & SDL_WINDOW_POPUP_MENU) {
wintype_name = "_NET_WM_WINDOW_TYPE_POPUP_MENU";
} |
functions | SDL_VIDEO_OPENGL_EGL
if (!_this->egl_data) {
return -1;
} |
functions | X_HAVE_UTF8_STRING
if (SDL_X11_HAVE_UTF8 && windowdata->ic) {
X11_XGetICValues(windowdata->ic, XNFilterEvents, &fevent, NULL);
} |
functions | int
X11_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
{
Window w = (Window) data;
window->title = X11_GetWindowTitle(_this, w);
if (SetupWindowData(_this, window, w, SDL_FALSE) < 0) {
return -1;
} |
functions | void
X11_SetWindowTitle(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
XTextProperty titleprop;
Status status;
const char *title = window->title ? window->title : "";
char *title_locale = NULL;
#ifdef X_HA... |
functions | X_HAVE_UTF8_STRING
if (SDL_X11_HAVE_UTF8) {
status = X11_Xutf8TextListToTextProperty(display, (char **) &title, 1,
XUTF8StringStyle, &titleprop);
if (status == Success) {
X11_XSetTextProperty(display, data->xwindow, &titleprop,
... |
functions | void
X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
Atom _NET_WM_ICON = data->videodata->_NET_WM_ICON;
if (icon) {
int propsize;
long *propdata;
/* Se... |
functions | void
X11_SetWindowPosition(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
unsigned int childCount;
Window childReturn, root, parent;
Window* children;
XWindowAttributes attrs;
int orig_x, orig_y;
Ui... |
functions | void
X11_SetWindowMinimumSize(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
if (window->flags & SDL_WINDOW_RESIZABLE) {
XSizeHints *sizehints = X11_XAllocSizeHints();
long userhints;
X11_X... |
functions | void
X11_SetWindowMaximumSize(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
if (window->flags & SDL_WINDOW_RESIZABLE) {
XSizeHints *sizehints = X11_XAllocSizeHints();
long userhints;
X11_X... |
functions | void
X11_SetWindowSize(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
XWindowAttributes attrs;
int orig_w, orig_h;
Uint32 timeout;
X11_XSync(display, False);
X11_XGetWindowAttributes(display, data->xwi... |
functions | int
X11_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *bottom, int *right)
{
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
*left = data->border_left;
*right = data->border_right;
*top = data->border_top;
*bottom = data->border_bottom;
return 0;
} |
functions | int
X11_SetWindowOpacity(_THIS, SDL_Window * window, float opacity)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
Atom _NET_WM_WINDOW_OPACITY = data->videodata->_NET_WM_WINDOW_OPACITY;
if (opacity == 1.0f) {
X11_XDeleteProperty(disp... |
functions | int
X11_SetWindowModalFor(_THIS, SDL_Window * modal_window, SDL_Window * parent_window) {
SDL_WindowData *data = (SDL_WindowData *) modal_window->driverdata;
SDL_WindowData *parent_data = (SDL_WindowData *) parent_window->driverdata;
Display *display = data->videodata->display;
X11_XSetTransientForHin... |
functions | int
X11_SetWindowInputFocus(_THIS, SDL_Window * window)
{
if (X11_IsWindowMapped(_this, window)) {
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
X11_XSetInputFocus(display, data->xwindow, RevertToNone, CurrentTime);
X11_XF... |
functions | void
X11_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
{
const SDL_bool focused = ((window->flags & SDL_WINDOW_INPUT_FOCUS) != 0);
const SDL_bool visible = ((window->flags & SDL_WINDOW_HIDDEN) == 0);
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displa... |
functions | void
X11_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
XSizeHints *sizehints = X11_XAllocSizeHints();
long userhints;
X11_XGetWMNormalHints(display, data->xwindow, size... |
functions | void
X11_ShowWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
XEvent event;
if (!X11_IsWindowMapped(_this, window)) {
X11_XMapRaised(display, data->xwindow);
/* Blocking wait for "MapNotify" e... |
functions | void
X11_HideWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
Display *display = data->videodata->display;
XEvent event;
if (X11_IsWindowMapped(_this, wi... |
functions | void
SetWindowActive(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displaydata =
(SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
Display *display = data->videodata->display;
Atom _NET_ACTIVE_WINDOW = data->videodata-... |
functions | void
X11_RaiseWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
X11_XRaiseWindow(display, data->xwindow);
SetWindowActive(_this, window);
X11_XFlush(display);
} |
functions | void
SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displaydata =
(SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
Display *display = data->videodata->display;
Atom _NET_WM_STATE ... |
functions | void
X11_MaximizeWindow(_THIS, SDL_Window * window)
{
SetWindowMaximized(_this, window, SDL_TRUE);
} |
functions | void
X11_MinimizeWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displaydata =
(SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
Display *display = data->videodata->display;
X11_XIconifyWindow(display, data->xwin... |
functions | void
X11_RestoreWindow(_THIS, SDL_Window * window)
{
SetWindowMaximized(_this, window, SDL_FALSE);
X11_ShowWindow(_this, window);
SetWindowActive(_this, window);
} |
functions | void
X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _display, SDL_bool fullscreen)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
Display *display = data->videodata->display;
Atom _NET_... |
functions | void
X11_BeginWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _display)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
Visual *visual = data->visual;
Display *display = data->videodata->displa... |
functions | SDL_VIDEO_DRIVER_X11_XVIDMODE
if ( displaydata->use_vidmode ) {
X11_XF86VidModeLockModeSwitch(display, screen, True);
} |
functions | void
X11_EndWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _display)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
Display *display = data->videodata->display;
const int screen = displaydata... |
functions | SDL_VIDEO_DRIVER_X11_VIDMODE
if ( displaydata->use_vidmode ) {
X11_XF86VidModeLockModeSwitch(display, screen, False);
} |
functions | void
X11_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * _display, SDL_bool fullscreen)
{
/* !!! FIXME: SDL_Hint? */
SDL_bool legacy = SDL_FALSE;
const char *env = SDL_getenv("SDL_VIDEO_X11_LEGACY_FULLSCREEN");
if (env) {
legacy = SDL_atoi(env);
} |
functions | else if ( !videodata->net_wm ) {
legacy = SDL_TRUE; /* The window manager doesn't support it */
} |
functions | int
X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
Visual *visual = data->visual;
Colormap colormap = data->colormap;
XColor *colorcells;
int ncolors;
int rma... |
functions | void
X11_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
SDL_bool oldstyle_fullscreen;
SDL_bool grab_keyboard;
/* ICCCM2.0-compliant window managers can handle fullscreen windows... |
functions | void
X11_DestroyWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
if (data) {
SDL_VideoData *videodata = (SDL_VideoData *) data->videodata;
Display *display = videodata->display;
int numwindows = videodata->numwindows;
SDL_WindowD... |
functions | X_HAVE_UTF8_STRING
if (data->ic) {
X11_XDestroyIC(data->ic);
} |
functions | endif
if (data->created) {
X11_XDestroyWindow(display, data->xwindow);
X11_XFlush(display);
} |
functions | SDL_bool
X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display;
if (!data) {
/* This sometimes happens in SDL_IBus_UpdateTextRect() while creating the window */
SDL_SetError("Window not initiali... |
functions | int
X11_SetWindowHitTest(SDL_Window *window, SDL_bool enabled)
{
return 0; /* just succeed, the real work is done elsewhere. */
} |
functions | void
X11_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
Atom XdndAware = X11_XInternAtom(display, "XdndAware", False);
if (accept) {
Atom xdnd_version = 5;
X11_XChangePr... |
functions | void board_init(void)
{
/* initialize the boards LEDs */
leds_init();
/* initialize the 2.4GHz RF switch */
rf_switch_init();
} |
functions | void leds_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
/* Shoot rainbows */
LED_RAINBOW();
} |
functions | void rf_switch_init(void)
{
/* Set RF 2.4GHz as default */
gpio_init(RF_SWITCH_GPIO, GPIO_OUT);
RF_SWITCH_2_4_GHZ;
} |
includes |
#include <stdio.h> |
includes | #include <string.h> |
includes | #include <stdlib.h> |
defines | #define PROCMEM_LINUX_PROC |
defines | #define PROCMEM_GETRUSAGE |
defines | #define max( a, b ) ( ((a) > (b)) ? (a) : (b) ) |
functions | int ipm_get_procmem(double *bytes)
{
FILE *fh;
int proc_ret;
char proc_var[80];
char *cp;
long long int ibytes;
#if defined(OS_LINUX)
#ifndef LINUX_XT3
#endif
#endif
#if defined (OS_AIX)
#endif
#ifdef PROCMEM_LINUX_PROC
#ifndef max
#endif
/* Old logic was max of VmPeak and VmHWM - for some reas... |
functions | int ipm_get_procmem_now(double *bytes) {
FILE *fh;
int pagesize=getpagesize();
fh = fopen("/proc/self/statm", "r");
if(fscanf(fh,"%lf", bytes)!=1) {
printf("IPM: %d error in ipm_get_procmem\n", task.mpi_rank);
} |
functions | int ipm_get_virtmem(double *bytes) {
return 0;
} |
main | int main(int argc, char* argv[])
{
double before, after;
double *mem;
ipm_get_procmem(&before);
mem = calloc( 1000*1000, sizeof(double) );
ipm_get_procmem(&after);
fprintf(stderr, "Testing ipm_get_procmem... %f %f %f\n",
before, after, after-before);
} |
defines |
#define USE_SPLITEXPF |
defines | #define USE_SCALEFLOAT_2 |
defines | #define USE_VALF_WITH_FLAGS |
functions | else if (y <= 1.0F)
{
float y2;
y2 = y*y;
if (y < 0.9F)
{
/* Use a [2,1] Remez approximation on [0,0.9]. */
z = y + y*y2*
(-0.28192806108402678e0F +
(-0.14628356048797849e-2F +
0.4891631088530669873e-4F*y2)*y2)/
(0.845... |
includes | #include <signal.h> |
includes | #include <stdio.h> |
includes | #include <stdlib.h> |
includes | #include <dlfcn.h> |
includes | #include <dlfcn.h> |
includes | #include <dlfcn.h> |
includes | #include <dlfcn.h> |
includes | #include <dlfcn.h> |
includes | #include <dlfcn.h> |
includes | #include <dlfcn.h> |
defines | #define __USE_GNU /* to un-hide RTLD_NEXT */ |
defines | #define init_done() (__next_sigaction != 0) |
defines | #define __SIGACTION __sigaction |
defines | #define INIT() do { if (!init_done()) do_init(); } while (0) |
defines | #define __USE_GNU /* to un-hide RTLD_NEXT */ |
defines | #define init_done() (__next_sigaction != 0) |
defines | #define __SIGACTION __sigaction |
defines | #define INIT() do { if (!init_done()) do_init(); } while (0) |
defines | #define __next_sigaction __sigaction /* pthreads-aware version */ |
defines | #define INIT() do{}while(0) |
defines | #define init_done() (__next_sigaction != 0) |
defines | #define INIT() do { if (!init_done()) do_init(); } while (0) |
defines | #define __DARWIN__ 1 |
defines | #define init_done() (__next_sigaction != 0) |
defines | #define __SIGACTION _sigaction |
defines | #define _NSIG NSIG |
defines | #define INIT() do { if (!init_done()) do_init(); } while (0) |
defines | #define init_done() (__next_sigaction != 0) |
defines | #define __SIGACTION _sigaction |
defines | #define _NSIG NSIG |
defines | #define INIT() do { if (!init_done()) do_init(); } while (0) |
defines | #define init_done() (__next_sigaction != 0) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.