unsigned long plane_mask, int format)
{
/* TODO: not sure what this function is supposed to do.. */
- ns_retain_object(pixmap);
+ ns_retain_object (pixmap);
return pixmap;
}
unsigned long
XGetPixel (XImagePtr ximage, int x, int y)
{
- return ns_get_pixel(ximage, x, y);
+ return ns_get_pixel (ximage, x, y);
}
/* use with imgs created by ns_image_for_XPM; alpha set to 1;
void
XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
{
- ns_put_pixel(ximage, x, y, pixel);
+ ns_put_pixel (ximage, x, y, pixel);
}
#endif /* HAVE_NS */
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
- void *bitmap = ns_image_from_XBM(bits, width, height);
+ void *bitmap = ns_image_from_XBM (bits, width, height);
if (!bitmap)
return -1;
#endif
#ifdef HAVE_NS
int id;
- void *bitmap = ns_image_from_file(file);
+ void *bitmap = ns_image_from_file (file);
if (!bitmap)
return -1;
dpyinfo->bitmaps[id - 1].refcount = 1;
dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1);
dpyinfo->bitmaps[id - 1].depth = 1;
- dpyinfo->bitmaps[id - 1].height = ns_image_width(bitmap);
- dpyinfo->bitmaps[id - 1].width = ns_image_height(bitmap);
+ dpyinfo->bitmaps[id - 1].height = ns_image_width (bitmap);
+ dpyinfo->bitmaps[id - 1].width = ns_image_height (bitmap);
strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file));
return id;
#endif
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
- ns_release_object(bm->img);
+ ns_release_object (bm->img);
#endif
if (bm->file)
#elif defined (HAVE_NS)
#define Destroy_Image(ximg, dummy) \
- ns_release_object(ximg)
+ ns_release_object (ximg)
#define Free_Pixmap(display, pixmap) \
- ns_release_object(pixmap)
+ ns_release_object (pixmap)
#else
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
- *pixmap = ns_image_for_XPM(width, height, depth);
+ *pixmap = ns_image_for_XPM (width, height, depth);
if (*pixmap == 0)
{
*ximg = NULL;
xfree (ximg);
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
- ns_release_object(ximg);
+ ns_release_object (ximg);
#endif /* HAVE_NS */
}
}
#ifdef HAVE_NS
xassert (ximg == pixmap);
- ns_retain_object(ximg);
+ ns_retain_object (ximg);
#endif
}
convert_mono_to_color_image (f, img, fg, bg);
#elif defined (HAVE_NS)
- img->pixmap = ns_image_from_XBM(data, img->width, img->height);
+ img->pixmap = ns_image_from_XBM (data, img->width, img->height);
#else
img->pixmap
invertedBits = bits;
nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
* img->height;
- bits = (char *) alloca(nbytes);
+ bits = (char *) alloca (nbytes);
for (i = 0; i < nbytes; i++)
bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
}
if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0))
goto failure;
s += 9;
- match();
+ match ();
expect_ident ("static");
expect_ident ("char");
expect ('*');
(!EQ (color_val, Qt) ? PIX_MASK_DRAW
: (have_mask = 1, PIX_MASK_RETAIN)));
#else
- if (EQ(color_val, Qt))
- ns_set_alpha(ximg, x, y, 0);
+ if (EQ (color_val, Qt))
+ ns_set_alpha (ximg, x, y, 0);
#endif
}
if (y + 1 < height)
? PIX_MASK_DRAW : PIX_MASK_RETAIN));
#else
if (XGetPixel (ximg, x, y) == bg)
- ns_set_alpha(ximg, x, y, 0);
+ ns_set_alpha (ximg, x, y, 0);
#endif /* HAVE_NS */
#ifndef HAVE_NS
/* Fill in the background_transparent field while we have the mask handy. */
static int
jpeg_load (struct frame *f, struct image *img)
{
- return ns_load_image(f, img,
- image_spec_value (img->spec, QCfile, NULL),
- image_spec_value (img->spec, QCdata, NULL));
+ return ns_load_image (f, img,
+ image_spec_value (img->spec, QCfile, NULL),
+ image_spec_value (img->spec, QCdata, NULL));
}
#endif /* HAVE_NS */
static int
tiff_load (struct frame *f, struct image *img)
{
- return ns_load_image(f, img,
- image_spec_value (img->spec, QCfile, NULL),
- image_spec_value (img->spec, QCdata, NULL));
+ return ns_load_image (f, img,
+ image_spec_value (img->spec, QCfile, NULL),
+ image_spec_value (img->spec, QCdata, NULL));
}
#endif /* HAVE_NS */
static int
gif_load (struct frame *f, struct image *img)
{
- return ns_load_image(f, img,
- image_spec_value (img->spec, QCfile, NULL),
- image_spec_value (img->spec, QCdata, NULL));
+ return ns_load_image (f, img,
+ image_spec_value (img->spec, QCfile, NULL),
+ image_spec_value (img->spec, QCdata, NULL));
}
#endif /* HAVE_NS */
background.pixel = FRAME_BACKGROUND_PIXEL (f);
x_query_color (f, &background);
#else
- ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1);
+ ns_query_color (FRAME_BACKGROUND_COLOR (f), &background, 1);
#endif
}
p->inherit_coding_system_flag
= !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system);
- Fserial_process_configure(nargs, args);
+ Fserial_process_configure (nargs, args);
specpdl_ptr = specpdl + specpdl_count;
ret = getaddrinfo (SDATA (host), portstring, &hints, &res);
if (ret)
#ifdef HAVE_GAI_STRERROR
- error ("%s/%s %s", SDATA (host), portstring, gai_strerror(ret));
+ error ("%s/%s %s", SDATA (host), portstring, gai_strerror (ret));
#else
error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret);
#endif
again:
ifaces += 25;
- buf_size = ifaces * sizeof(ifreqs[0]);
+ buf_size = ifaces * sizeof (ifreqs[0]);
ifreqs = (struct ifreq *)xrealloc(ifreqs, buf_size);
if (!ifreqs)
{
int i;
args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x");
for (i = 0; i < 8; i++)
- args[i+1] = make_number (ntohs(ip6[i]));
+ args[i+1] = make_number (ntohs (ip6[i]));
host = Fformat (9, args);
service = make_number (ntohs (saddr.in.sin_port));
/* getsockopt(,,SO_ERROR,,) is said to hang on some systems.
So only use it on systems where it is known to work. */
{
- int xlen = sizeof(xerrno);
- if (getsockopt(channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen))
+ int xlen = sizeof (xerrno);
+ if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen))
xerrno = errno;
}
#else
{
struct sockaddr pname;
- int pnamelen = sizeof(pname);
+ int pnamelen = sizeof (pname);
/* If connection failed, getpeername will fail. */
xerrno = 0;
- if (getpeername(channel, &pname, &pnamelen) < 0)
+ if (getpeername (channel, &pname, &pnamelen) < 0)
{
/* Obtain connect failure code through error slippage. */
char dummy;
xerrno = errno;
- if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)
+ if (errno == ENOTCONN && read (channel, &dummy, 1) < 0)
xerrno = errno;
}
}
CHECK_SYMBOL (sigcode);
name = SDATA (SYMBOL_NAME (sigcode));
- if (!strncmp(name, "SIG", 3) || !strncmp(name, "sig", 3))
+ if (!strncmp (name, "SIG", 3) || !strncmp (name, "sig", 3))
name += 3;
if (0)
processes. As such, we only change the default value. */
if (initialized)
{
- char *release = get_operating_system_release();
+ char *release = get_operating_system_release ();
if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION
&& release[1] == '.')) {
Vprocess_connection_type = Qnil;
if (g_b_init_is_windows_9x == 0)
{
g_b_init_is_windows_9x = 1;
- ZeroMemory(&os_ver, sizeof(OSVERSIONINFO));
- os_ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ ZeroMemory (&os_ver, sizeof (OSVERSIONINFO));
+ os_ver.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (GetVersionEx (&os_ver))
{
s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
if (get_process_times_fn)
{
FILETIME create, exit, kernel, user;
- HANDLE proc = GetCurrentProcess();
+ HANDLE proc = GetCurrentProcess ();
if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user))
{
LARGE_INTEGER user_int, kernel_int, total;
lpSystemInfo->dwNumberOfProcessors = -1;
}
-BOOL WINAPI get_system_times(
+BOOL WINAPI get_system_times (
LPFILETIME lpIdleTime,
LPFILETIME lpKernelTime,
LPFILETIME lpUserTime)
{"LANG", NULL},
};
-#define N_ENV_VARS sizeof(dflt_envvars)/sizeof(dflt_envvars[0])
+#define N_ENV_VARS sizeof (dflt_envvars)/sizeof (dflt_envvars[0])
/* We need to copy dflt_envvars[] and work on the copy because we
don't want the dumped Emacs to inherit the values of
for (p = modname; *p; p++)
if (*p == '\\') *p = '/';
- _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
+ _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname);
_putenv (strdup (buf));
}
/* Handle running emacs from the build directory: src/oo-spd/i386/ */
for (p = modname; *p; p++)
if (*p == '\\') *p = '/';
- _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
+ _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname);
_putenv (strdup (buf));
}
}
char buf1[SET_ENV_BUF_SIZE], buf2[SET_ENV_BUF_SIZE];
if (dwType == REG_EXPAND_SZ)
- ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof(buf1));
+ ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof (buf1));
else if (dwType == REG_SZ)
strcpy (buf1, lpval);
if (dwType == REG_EXPAND_SZ || dwType == REG_SZ)
{
- _snprintf (buf2, sizeof(buf2)-1, "%s=%s", env_vars[i].name,
+ _snprintf (buf2, sizeof (buf2)-1, "%s=%s", env_vars[i].name,
buf1);
_putenv (strdup (buf2));
}
involve network access, and so is extremely quick). */
/* Map drive letter to UNC if remote. */
- if ( isalpha( root_dir[0] ) && !fixed[ DRIVE_INDEX( root_dir[0] ) ] )
+ if (isalpha (root_dir[0]) && !fixed[DRIVE_INDEX (root_dir[0])])
{
char remote_name[ 256 ];
char drive[3] = { root_dir[0], ':' };
nr.lpComment = NULL;
nr.lpProvider = NULL;
- result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_CONNECTABLE, &nr, &henum);
+ result = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
+ RESOURCEUSAGE_CONNECTABLE, &nr, &henum);
if (result == NO_ERROR)
return henum;
data.wid.dwStreamId = BACKUP_LINK;
data.wid.dwStreamAttributes = 0;
- data.wid.Size.LowPart = wlen * sizeof(WCHAR);
+ data.wid.Size.LowPart = wlen * sizeof (WCHAR);
data.wid.Size.HighPart = 0;
data.wid.dwStreamNameSize = 0;
char name[UNLEN+1];
DWORD name_len = sizeof (name);
char domain[1024];
- DWORD domain_len = sizeof(domain);
+ DWORD domain_len = sizeof (domain);
char *mp = NULL;
int use_dflt = 0;
int result;
/* Helper wrapper functions. */
-HANDLE WINAPI create_toolhelp32_snapshot(
+HANDLE WINAPI create_toolhelp32_snapshot (
DWORD Flags,
DWORD Ignored)
{
return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored));
}
-BOOL WINAPI process32_first(
+BOOL WINAPI process32_first (
HANDLE hSnapshot,
LPPROCESSENTRY32 lppe)
{
return (s_pfn_Process32_First (hSnapshot, lppe));
}
-BOOL WINAPI process32_next(
+BOOL WINAPI process32_next (
HANDLE hSnapshot,
LPPROCESSENTRY32 lppe)
{
if (!h_proc
|| !get_process_times_fn
- || !(*get_process_times_fn)(h_proc, &ft_creation, &ft_exit,
- &ft_kernel, &ft_user))
+ || !(*get_process_times_fn) (h_proc, &ft_creation, &ft_exit,
+ &ft_kernel, &ft_user))
return 0;
GetSystemTimeAsFileTime (&ft_current);
if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \
goto fail;
- LOAD_PROC( WSAStartup );
- LOAD_PROC( WSASetLastError );
- LOAD_PROC( WSAGetLastError );
- LOAD_PROC( WSAEventSelect );
- LOAD_PROC( WSACreateEvent );
- LOAD_PROC( WSACloseEvent );
- LOAD_PROC( socket );
- LOAD_PROC( bind );
- LOAD_PROC( connect );
- LOAD_PROC( ioctlsocket );
- LOAD_PROC( recv );
- LOAD_PROC( send );
- LOAD_PROC( closesocket );
- LOAD_PROC( shutdown );
- LOAD_PROC( htons );
- LOAD_PROC( ntohs );
- LOAD_PROC( inet_addr );
- LOAD_PROC( gethostname );
- LOAD_PROC( gethostbyname );
- LOAD_PROC( getservbyname );
- LOAD_PROC( getpeername );
- LOAD_PROC( WSACleanup );
- LOAD_PROC( setsockopt );
- LOAD_PROC( listen );
- LOAD_PROC( getsockname );
- LOAD_PROC( accept );
- LOAD_PROC( recvfrom );
- LOAD_PROC( sendto );
+ LOAD_PROC (WSAStartup);
+ LOAD_PROC (WSASetLastError);
+ LOAD_PROC (WSAGetLastError);
+ LOAD_PROC (WSAEventSelect);
+ LOAD_PROC (WSACreateEvent);
+ LOAD_PROC (WSACloseEvent);
+ LOAD_PROC (socket);
+ LOAD_PROC (bind);
+ LOAD_PROC (connect);
+ LOAD_PROC (ioctlsocket);
+ LOAD_PROC (recv);
+ LOAD_PROC (send);
+ LOAD_PROC (closesocket);
+ LOAD_PROC (shutdown);
+ LOAD_PROC (htons);
+ LOAD_PROC (ntohs);
+ LOAD_PROC (inet_addr);
+ LOAD_PROC (gethostname);
+ LOAD_PROC (gethostbyname);
+ LOAD_PROC (getservbyname);
+ LOAD_PROC (getpeername);
+ LOAD_PROC (WSACleanup);
+ LOAD_PROC (setsockopt);
+ LOAD_PROC (listen);
+ LOAD_PROC (getsockname);
+ LOAD_PROC (accept);
+ LOAD_PROC (recvfrom);
+ LOAD_PROC (sendto);
#undef LOAD_PROC
/* specify version 1.1 of winsock */
};
char *
-sys_strerror(int error_no)
+sys_strerror (int error_no)
{
int i;
static char unknown_msg[40];
if (_wsa_errlist[i].errnum == error_no)
return _wsa_errlist[i].msg;
- sprintf(unknown_msg, "Unidentified error: %d", error_no);
+ sprintf (unknown_msg, "Unidentified error: %d", error_no);
return unknown_msg;
}
int socket_to_fd (SOCKET s);
int
-sys_socket(int af, int type, int protocol)
+sys_socket (int af, int type, int protocol)
{
SOCKET s;
}
struct hostent *
-sys_gethostbyname(const char * name)
+sys_gethostbyname (const char * name)
{
struct hostent * host;
}
struct servent *
-sys_getservbyname(const char * name, const char * proto)
+sys_getservbyname (const char * name, const char * proto)
{
struct servent * serv;
int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0);
if (res == SOCKET_ERROR)
{
- DebPrint(("sys_read.recv failed with error %d on socket %ld\n",
- pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
+ DebPrint (("sys_read.recv failed with error %d on socket %ld\n",
+ pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
set_errno ();
return -1;
}
if (nchars == SOCKET_ERROR)
{
- DebPrint(("sys_write.send failed with error %d on socket %ld\n",
- pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
+ DebPrint (("sys_write.send failed with error %d on socket %ld\n",
+ pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
set_errno ();
}
}
up to date when the user logs off, or the system shuts down.
*/
BOOL WINAPI
-shutdown_handler(DWORD type)
+shutdown_handler (DWORD type)
{
/* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */
if (type == CTRL_CLOSE_EVENT /* User closes console window. */
console apps. This actually applies to Emacs in both console and
GUI modes, since we had to fool windows into thinking emacs is a
console application to get console mode to work. */
- SetConsoleCtrlHandler(shutdown_handler, TRUE);
+ SetConsoleCtrlHandler (shutdown_handler, TRUE);
/* "None" is the default group name on standalone workstations. */
strcpy (dflt_group_name, "None");
***********************************************************************/
void
-sys_tputs (char *str, int nlines, int (*outfun)(int))
+sys_tputs (char *str, int nlines, int (*outfun) (int))
{
}
/* Respect setting of LINES and COLUMNS environment variables. */
{
- char * lines = getenv("LINES");
- char * columns = getenv("COLUMNS");
+ char * lines = getenv ("LINES");
+ char * columns = getenv ("COLUMNS");
if (lines != NULL && columns != NULL)
{
wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam);
/* Get buffer size. */
size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0);
- buffer = alloca(size);
+ buffer = alloca (size);
size = get_composition_string_fn (context, GCS_RESULTSTR,
buffer, size);
release_ime_context_fn (hwnd, context);
/* Save clip region for later restoration. */
orig_clip = CreateRectRgn (0, 0, 0, 0);
- if (!GetClipRgn(s->hdc, orig_clip))
+ if (!GetClipRgn (s->hdc, orig_clip))
{
DeleteObject (orig_clip);
orig_clip = NULL;
return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown;
charset = w32_to_x_charset (w32_charset, NULL);
- return font_intern_prop (charset, strlen(charset), 1);
+ return font_intern_prop (charset, strlen (charset), 1);
}
static int
*part = 0;
SELECTED_FRAME ()->mouse_moved = 0;
- XSETINT(*x, movement_pos.X);
- XSETINT(*y, movement_pos.Y);
+ XSETINT (*x, movement_pos.X);
+ XSETINT (*y, movement_pos.Y);
*time = movement_time;
UNBLOCK_INPUT;
/* Frame title: 'Q' = Question, 'I' = Information.
Can also have 'E' = Error if, one day, we want
a popup for errors. */
- if (NILP(header))
+ if (NILP (header))
dialog_name[0] = 'Q';
else
dialog_name[0] = 'I';
#include <windows.h>
#ifdef __GNUC__
/* This definition is missing from mingw32 headers. */
-extern BOOL WINAPI IsValidLocale(LCID, DWORD);
+extern BOOL WINAPI IsValidLocale (LCID, DWORD);
#endif
#ifdef HAVE_LANGINFO_CODESET
}
#endif
-typedef void (_CALLBACK_ *signal_handler)(int);
+typedef void (_CALLBACK_ *signal_handler) (int);
/* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */
static signal_handler sig_handlers[NSIG];
cp = &child_procs[child_proc_count++];
Initialise:
- memset (cp, 0, sizeof(*cp));
+ memset (cp, 0, sizeof (*cp));
cp->fd = -1;
cp->pid = -1;
cp->procinfo.hProcess = NULL;
return TRUE;
EH_Fail:
- DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError()););
+ DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError ()););
return FALSE;
}
static char hex[] = "0123456789abcdefABCDEF";
char * p;
- while (*s && (p = strchr(hex, *s)) != NULL)
+ while (*s && (p = strchr (hex, *s)) != NULL)
{
unsigned digit = p - hex;
if (digit > 15)
SDATA (SYMBOL_NAME (coding_system))));
setup_windows_coding_system (coding_system, &coding);
- coding.dst_bytes = SBYTES(current_text) * 2;
+ coding.dst_bytes = SBYTES (current_text) * 2;
coding.destination = (unsigned char *) xmalloc (coding.dst_bytes);
encode_coding_object (&coding, current_text, 0, 0,
SCHARS (current_text), SBYTES (current_text), Qnil);
if (SetClipboardData (format, htext) == NULL)
{
- GlobalFree(htext);
+ GlobalFree (htext);
return Qnil;
}
if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL)
{
- GlobalFree(hlocale);
+ GlobalFree (hlocale);
return Qnil;
}
if (SetClipboardData (CF_LOCALE, hlocale) == NULL)
{
- GlobalFree(hlocale);
+ GlobalFree (hlocale);
return Qnil;
}
automatic conversions anywhere else, so to get consistent
results, we probably don't want to rely on it here either. */
- render_locale();
+ render_locale ();
if (current_clipboard_type == CF_UNICODETEXT)
render (make_number (CF_TEXT));
/* If we have something non-ASCII we may want to set a locale. We
do that directly (non-delayed), as it's just a small bit. */
if (ok)
- ok = !NILP(render_locale());
+ ok = !NILP (render_locale ());
if (ok)
{
/* If for some reason we don't have a clipboard_owner, we
just set the text format as chosen by the configuration
and than forget about the whole thing. */
- ok = !NILP(render (make_number (current_clipboard_type)));
+ ok = !NILP (render (make_number (current_clipboard_type)));
current_text = Qnil;
current_coding_system = Qnil;
}
/* Draw strike-through. */
if (s->face->strike_through_p
- && !FONT_TEXTMETRIC(s->font).tmStruckOut)
+ && !FONT_TEXTMETRIC (s->font).tmStruckOut)
{
unsigned long h = 1;
unsigned long dy = (s->height - h) / 2;
BLOCK_INPUT;
si.cbSize = sizeof (si);
si.fMask = SIF_POS | SIF_PAGE;
- GetScrollInfo(w, SB_CTL, &si);
+ GetScrollInfo (w, SB_CTL, &si);
near_bottom_p = si.nPos + si.nPage >= range;
UNBLOCK_INPUT;
if (!near_bottom_p)
temp_index = 0;
temp_buffer[temp_index++] = msg.msg.wParam;
inev.kind = MULTIMEDIA_KEY_EVENT;
- inev.code = GET_APPCOMMAND_LPARAM(msg.msg.lParam);
+ inev.code = GET_APPCOMMAND_LPARAM (msg.msg.lParam);
inev.modifiers = msg.dwModifiers;
XSETFRAME (inev.frame_or_window, f);
inev.timestamp = msg.msg.time;
selected now and last mouse movement event was
not in it. Minibuffer window will be selected
only when it is active. */
- if (WINDOWP(window)
+ if (WINDOWP (window)
&& !EQ (window, last_window)
&& !EQ (window, selected_window)
/* For click-to-focus window managers
rect.right = pixelwidth;
rect.bottom = pixelheight;
- AdjustWindowRect(&rect, f->output_data.w32->dwStyle,
- FRAME_EXTERNAL_MENU_BAR (f));
+ AdjustWindowRect (&rect, f->output_data.w32->dwStyle,
+ FRAME_EXTERNAL_MENU_BAR (f));
my_set_window_pos (FRAME_W32_WINDOW (f),
NULL,
/* Adjust vertical window position in order to avoid being
covered by a task bar placed at the bottom of the desktop. */
- SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0);
- GetWindowRect(FRAME_W32_WINDOW(f), &window_rect);
+ SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea_rect, 0);
+ GetWindowRect (FRAME_W32_WINDOW(f), &window_rect);
if (window_rect.bottom > workarea_rect.bottom
&& window_rect.top > workarea_rect.top)
f->top_pos = max (window_rect.top
}
dpyinfo->color_list = NULL;
if (dpyinfo->palette)
- DeleteObject(dpyinfo->palette);
+ DeleteObject (dpyinfo->palette);
}
xfree (dpyinfo->w32_id_name);
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, FONT_HANDLE(font));
+ old_font = SelectObject (context, FONT_HANDLE (font));
features = otf_features (context, "GSUB");
XSETCAR (capability, features);
passed in. */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, FONT_HANDLE(font));
+ old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptShape (context, &(uniscribe_font->cache),
chars + items[i].iCharPos, nchars_in_run,
/* Cache not complete... */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, FONT_HANDLE(font));
+ old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptPlace (context, &(uniscribe_font->cache),
glyphs, nglyphs, attributes, &(items[i].a),
/* Cache incomplete... */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, FONT_HANDLE(font));
+ old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptGetGlyphABCWidth (context,
&(uniscribe_font->cache),
glyphs[j], &char_metric);
the frame. */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, FONT_HANDLE(font));
+ old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptShape (context, &(uniscribe_font->cache),
ch, len, 2, &(items[0].a),
glyphs, clusters, attrs, &nglyphs);
if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect),
&(lpCur->w32msg.rect)))
{
- SetRectEmpty(&(lpmsg->rect));
+ SetRectEmpty (&(lpmsg->rect));
}
myfree (lpCur);
{
register struct window *w = decode_any_window (window);
int add_x, add_y;
- calc_absolute_offset(w, &add_x, &add_y);
+ calc_absolute_offset (w, &add_x, &add_y);
return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x),
Fcons (make_number (WINDOW_TOP_EDGE_Y (w) + add_y),
{
register struct window *w = decode_any_window (window);
int add_x, add_y;
- calc_absolute_offset(w, &add_x, &add_y);
+ calc_absolute_offset (w, &add_x, &add_y);
return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w)
+ WINDOW_LEFT_MARGIN_WIDTH (w)
a specific window, it will attempt to strictly resize that window
proportionally, even at the expense of deleting smaller windows. */
static int *
-shrink_windows (int total, int size, int nchildren, int shrinkable,
+shrink_windows (int total, int size, int nchildren, int shrinkable,
int resize_fixed_p, Lisp_Object forward, int width_p, int safe_p)
{
int available_resize = 0;
point. */
if (/* previous candidate is a glyph in TEXT_AREA of that row */
w->cursor.hpos >= 0
- && w->cursor.hpos < MATRIX_ROW_USED(matrix, w->cursor.vpos)
+ && w->cursor.hpos < MATRIX_ROW_USED (matrix, w->cursor.vpos)
&& BUFFERP (g1->object)
&& (g1->charpos == pt_old /* an exact match always wins */
|| (BUFFERP (glyph->object)
it->pixel_width = 0;
it->nglyphs = 0;
- height = get_it_property(it, Qline_height);
+ height = get_it_property (it, Qline_height);
/* Split (line-height total-height) list */
if (CONSP (height)
&& CONSP (XCDR (height))
total_height = XCAR (XCDR (height));
height = XCAR (height);
}
- height = calc_line_height_property(it, height, font, boff, 1);
+ height = calc_line_height_property (it, height, font, boff, 1);
if (it->override_ascent >= 0)
{
it->ascent = XINT (height) - it->descent;
if (!NILP (total_height))
- spacing = calc_line_height_property(it, total_height, font, boff, 0);
+ spacing = calc_line_height_property (it, total_height, font, boff, 0);
else
{
- spacing = get_it_property(it, Qline_spacing);
- spacing = calc_line_height_property(it, spacing, font, boff, 0);
+ spacing = get_it_property (it, Qline_spacing);
+ spacing = calc_line_height_property (it, spacing, font, boff, 0);
}
if (INTEGERP (spacing))
{
{
GC gc = xmalloc (sizeof (*gc));
if (gc)
- bcopy(xgcv, gc, sizeof(XGCValues));
+ bcopy (xgcv, gc, sizeof (XGCValues));
return gc;
}
if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc)
/* Since the WM decoration lies under the FRAME_OUTER_WINDOW,
we must treat the former instead of the latter. */
- win = FRAME_X_OUTPUT(f)->parent_desc;
+ win = FRAME_X_OUTPUT (f)->parent_desc;
if (dpyinfo->x_highlight_frame == f)
alpha = f->alpha[0];
unsigned long n, left;
x_catch_errors (dpy);
- rc = XGetWindowProperty(dpy, win, XInternAtom(dpy, OPACITY, False),
- 0L, 1L, False, XA_CARDINAL,
- &actual, &format, &n, &left,
- &data);
+ rc = XGetWindowProperty (dpy, win, XInternAtom(dpy, OPACITY, False),
+ 0L, 1L, False, XA_CARDINAL,
+ &actual, &format, &n, &left,
+ &data);
if (rc == Success && actual != None)
if (*(unsigned long *)data == opac)
extra = s->face->id == TOOL_BAR_FACE_ID
? XINT (Vtool_bar_button_margin) : 0;
-
+
x0 = x - thick - extra;
y0 = y - thick - extra;
x1 = x + s->slice.width + thick - 1 + extra;
redisplay, do it here. */
gtk_widget_queue_draw (FRAME_GTK_WIDGET (f));
#endif
-
+
XFlush (FRAME_X_DISPLAY (f));
UNBLOCK_INPUT;
XTtoggle_invisible_pointer (FRAME_PTR f, int invisible)
{
BLOCK_INPUT;
- if (invisible)
+ if (invisible)
{
if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0)
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
if (f->output_data.x->scroll_bar_top_shadow_pixel == -1)
{
pixel = f->output_data.x->scroll_bar_background_pixel;
- if (pixel != -1)
+ if (pixel != -1)
{
if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
FRAME_X_COLORMAP (f),
if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
{
pixel = f->output_data.x->scroll_bar_background_pixel;
- if (pixel != -1)
+ if (pixel != -1)
{
if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
FRAME_X_COLORMAP (f),
EVENT_INIT (inev.ie);
inev.ie.kind = NO_EVENT;
inev.ie.arg = Qnil;
-
+
if (pending_event_wait.eventtype == event.type)
pending_event_wait.eventtype = 0; /* Indicates we got it. */
-
+
switch (event.type)
{
case ClientMessage:
event.xconfigure.height);
f = 0;
}
-#endif
+#endif
if (f)
{
#ifndef USE_X_TOOLKIT
set_wm_state (frame, 0, fs, NULL);
set_wm_state (frame, 0, fh, NULL);
set_wm_state (frame, 0, fw, NULL);
-
+
/* If there are _NET_ atoms we assume we have extended window manager
hints. */
switch (f->want_fullscreen)
for (i = 0; i < actual_size; ++i)
{
Atom a = ((Atom*)tmp_data)[i];
- if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
+ if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
{
if (value == FULLSCREEN_HEIGHT)
value = FULLSCREEN_MAXIMIZED;
}
lval = Qnil;
- switch (value)
+ switch (value)
{
case FULLSCREEN_WIDTH:
lval = Qfullwidth;
lval = Qmaximized;
break;
}
-
+
store_frame_param (f, Qfullscreen, lval);
store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
case FULLSCREEN_HEIGHT:
height = x_display_pixel_height (dpyinfo);
}
-
+
if (FRAME_COLS (f) != width || FRAME_LINES (f) != height)
{
change_frame_size (f, height, width, 0, 1, 0);
FD_ZERO (&fds);
FD_SET (fd, &fds);
-
+
EMACS_GET_TIME (time_now);
EMACS_SUB_TIME (tmo, tmo_at, time_now);
if (NILP (tip_frame) || XFRAME (tip_frame) != f)
{
int r, c;
-
+
/* When the frame is maximized/fullscreen or running under for
example Xmonad, x_set_window_size_1 will be a no-op.
In that case, the right thing to do is extend rows/cols to
fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message);
}
#endif
-
+
/* Open a connection to X display DISPLAY_NAME, and return
the structure that describes the open display.
If we cannot contact the display, return null. */
= XInternAtom (dpyinfo->display, "_NET_WM_ICON_NAME", False);
dpyinfo->Xatom_net_wm_name
= XInternAtom (dpyinfo->display, "_NET_WM_NAME", False);
-
+
dpyinfo->cut_buffers_initialized = 0;
dpyinfo->x_dnd_atoms_size = 8;
#ifdef HAVE_X_SM
/* Close X session management when we close its display. */
if (t->id == 1 && x_session_have_connection ())
- x_session_close();
+ x_session_close ();
#endif
delete_terminal (t);
break;