Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Gnome/gtk/     Datei vom 30.5.2026 mit Größe 3 kB image not shown  

SSL gskrectsnapprivate.h  Sprache: C


#pragma once

#include "gskrectsnap.h"

#define gsk_rect_snap_new(...) _gsk_rect_snap_new(__VA_ARGS__)
static inline GskRectSnap
_gsk_rect_snap_new (GskSnapDirection top,
                    GskSnapDirection right,
                    GskSnapDirection bottom,
                    GskSnapDirection left)
{
  return GSK_RECT_SNAP_INIT (top, right, bottom, left);
}

#define gsk_rect_snap_get_direction(...) _gsk_rect_snap_get_direction(__VA_ARGS__)
static inline GskSnapDirection
_gsk_rect_snap_get_direction (GskRectSnap snap,
                              GskSide     side)
{ 
  return (GskSnapDirection) ((snap >> (8 * side)) & 0xFF);
}

#define gsk_rect_snap_can_shrink(...) _gsk_rect_snap_can_shrink(__VA_ARGS__)
static inline gboolean
_gsk_rect_snap_can_shrink (GskRectSnap snap)
{
  GskSnapDirection dir;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_TOP);
  if (dir == GSK_SNAP_CEIL || dir == GSK_SNAP_ROUND)
    return TRUE;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_RIGHT);
  if (dir == GSK_SNAP_FLOOR || dir == GSK_SNAP_ROUND)
    return TRUE;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_BOTTOM);
  if (dir == GSK_SNAP_FLOOR || dir == GSK_SNAP_ROUND)
    return TRUE;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_LEFT);
  if (dir == GSK_SNAP_CEIL || dir == GSK_SNAP_ROUND)
    return TRUE;

  return FALSE;
}

#define gsk_rect_snap_can_grow(...) _gsk_rect_snap_can_grow(__VA_ARGS__)
static inline gboolean
_gsk_rect_snap_can_grow (GskRectSnap snap)
{
  GskSnapDirection dir;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_TOP);
  if (dir == GSK_SNAP_FLOOR || dir == GSK_SNAP_ROUND)
    return TRUE;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_RIGHT);
  if (dir == GSK_SNAP_CEIL || dir == GSK_SNAP_ROUND)
    return TRUE;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_BOTTOM);
  if (dir == GSK_SNAP_CEIL || dir == GSK_SNAP_ROUND)
    return TRUE;

  dir = _gsk_rect_snap_get_direction (snap, GSK_SIDE_LEFT);
  if (dir == GSK_SNAP_FLOOR || dir == GSK_SNAP_ROUND)
    return TRUE;

  return FALSE;
}


Messung
CHZG
801008990

¤ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*Bot Zugriff