mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:23:33 +08:00
Manually fixup merge botches via direct comparison with NuttX r5447.
This commit is contained in:
+48
-50
@@ -33,7 +33,6 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/.config
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
DEPPATH = --dep-path .
|
||||
@@ -44,34 +43,34 @@ endif
|
||||
|
||||
include nxglib/Make.defs
|
||||
DEPPATH += --dep-path nxglib
|
||||
CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxglib}
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxglib}
|
||||
|
||||
include nxbe/Make.defs
|
||||
DEPPATH += --dep-path nxbe
|
||||
CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxbe}
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxbe}
|
||||
|
||||
ifeq ($(CONFIG_NX_MULTIUSER),y)
|
||||
include nxmu/Make.defs
|
||||
DEPPATH += --dep-path nxmu
|
||||
CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu}
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu}
|
||||
else
|
||||
include nxsu/Make.defs
|
||||
DEPPATH += --dep-path nxsu
|
||||
CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxsu}
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxsu}
|
||||
endif
|
||||
|
||||
include nxtk/Make.defs
|
||||
DEPPATH += --dep-path nxtk
|
||||
CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxtk}
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxtk}
|
||||
|
||||
include nxfonts/Make.defs
|
||||
DEPPATH += --dep-path nxfonts
|
||||
CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxfonts}
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxfonts}
|
||||
|
||||
ifeq ($(CONFIG_NXCONSOLE),y)
|
||||
include nxconsole/Make.defs
|
||||
DEPPATH += --dep-path nxconsole
|
||||
CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxconsole}
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxconsole}
|
||||
endif
|
||||
|
||||
ASRCS = $(NXGLIB_ASRCS) $(NXBE_ASRCS) $(NX_ASRCS) $(NXTK_ASRCS) $(NXFONTS_ASRCS) $(NXCON_ASRCS)
|
||||
@@ -97,84 +96,84 @@ all: mklibgraphics
|
||||
gen32bppsources genfontsources
|
||||
|
||||
gen1bppsources:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
gen2bppsource:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
gen4bppsource:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
gen8bppsource:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
gen16bppsource:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
gen24bppsource:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
gen32bppsources:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
genfontsources:
|
||||
ifeq ($(CONFIG_NXFONT_SANS23X27),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=1 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=1 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS22X29),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS28X37),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=3 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=3 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS39X48),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=4 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=4 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS17X23B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=16 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=16 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS20X27B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=17 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=17 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS22X29B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=5 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=5 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS28X37B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=6 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=6 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS40X49B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=7 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=7 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SERIF22X29),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=8 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=8 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SERIF29X37),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=9 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=9 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SERIF38X48),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=10 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=10 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SERIF22X28B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=11 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=11 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SERIF27X38B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=12 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=12 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SERIF38X49B),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=13 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=13 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS17X22),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=14 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=14 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
ifeq ($(CONFIG_NXFONT_SANS20X26),y)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=15 EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=15 EXTRADEFINES=$(EXTRADEFINES)
|
||||
endif
|
||||
|
||||
gensources: gen1bppsources gen2bppsource gen4bppsource gen8bppsource gen16bppsource gen24bppsource gen32bppsources genfontsources
|
||||
@@ -186,30 +185,29 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
$(BIN): $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
mklibgraphics: gensources $(BIN)
|
||||
|
||||
.depend: gensources Makefile $(SRCS)
|
||||
@$(MKDEP) $(DEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
context: gensources
|
||||
|
||||
clean:
|
||||
@$(MAKE) -C nxglib -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
@rm -f $(BIN) *~ .*.swp
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(call DELFILE, $(BIN))
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@$(MAKE) -C nxglib -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
@$(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
@rm -f Make.dep .depend
|
||||
$(Q) $(MAKE) -C nxglib -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||
$(call DELFILE, Make.dep)
|
||||
$(call DELFILE, .depend)
|
||||
|
||||
-include Make.dep
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/.config
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
ifdef NXFONTS_BITSPERPIXEL
|
||||
@@ -177,13 +176,14 @@ all: $(GEN_CSRC)
|
||||
.PHONY : clean distclean
|
||||
|
||||
$(GEN_CSRC) : $(DEPENDENCY)
|
||||
@$(call PREPROCESS, $<, $(GEN_TMP))
|
||||
@cat $(GEN_TMP) | sed -e "/^#/d" >$@
|
||||
@rm -f $(GEN_TMP)
|
||||
$(call PREPROCESS, $<, $(GEN_TMP))
|
||||
$(Q) cat $(GEN_TMP) | sed -e "/^#/d" >$@
|
||||
$(Q) rm -f $(GEN_TMP)
|
||||
|
||||
clean:
|
||||
@rm -f *~ .*.swp *.i
|
||||
$(call DELFILE, *.i)
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@rm -f nxfonts_convert_*bpp.c
|
||||
@rm -f nxfonts_bitmaps_*.c
|
||||
$(call DELFILE, nxfonts_convert_*bpp.c)
|
||||
$(call DELFILE, nxfonts_bitmaps_*.c)
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/.config
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
ifeq ($(NXGLIB_BITSPERPIXEL),1)
|
||||
@@ -123,53 +122,54 @@ all: $(GEN_CSRCS)
|
||||
|
||||
$(SETP_CSRC) : $(BLITDIR)/nxglib_setpixel.c nxglib_bitblit.h
|
||||
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
||||
@$(call PREPROCESS, $(BLITDIR)/nxglib_setpixel.c, $(SETP_TMP))
|
||||
@cat $(SETP_TMP) | sed -e "/^#/d" >$@
|
||||
@rm -f $(SETP_TMP)
|
||||
$(call PREPROCESS, $(BLITDIR)/nxglib_setpixel.c, $(SETP_TMP))
|
||||
$(Q) cat $(SETP_TMP) | sed -e "/^#/d" >$@
|
||||
$(Q) rm -f $(SETP_TMP)
|
||||
endif
|
||||
|
||||
$(RFILL_CSRC) : $(BLITDIR)/nxglib_fillrectangle.c nxglib_bitblit.h
|
||||
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
||||
@$(call PREPROCESS, $(BLITDIR)/nxglib_fillrectangle.c, $(RFILL_TMP))
|
||||
@cat $(RFILL_TMP) | sed -e "/^#/d" >$@
|
||||
@rm -f $(RFILL_TMP)
|
||||
$(call PREPROCESS, $(BLITDIR)/nxglib_fillrectangle.c, $(RFILL_TMP))
|
||||
$(Q) cat $(RFILL_TMP) | sed -e "/^#/d" >$@
|
||||
$(Q) rm -f $(RFILL_TMP)
|
||||
endif
|
||||
|
||||
$(RGET_CSRC) : $(BLITDIR)/nxglib_getrectangle.c nxglib_bitblit.h
|
||||
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
||||
@$(call PREPROCESS, $(BLITDIR)/nxglib_getrectangle.c, $(RGET_TMP))
|
||||
@cat $(RGET_TMP) | sed -e "/^#/d" >$@
|
||||
@rm -f $(RGET_TMP)
|
||||
$(call PREPROCESS, $(BLITDIR)/nxglib_getrectangle.c, $(RGET_TMP))
|
||||
$(Q) cat $(RGET_TMP) | sed -e "/^#/d" >$@
|
||||
$(Q) rm -f $(RGET_TMP)
|
||||
endif
|
||||
|
||||
$(TFILL_CSRC) : $(BLITDIR)/nxglib_filltrapezoid.c nxglib_bitblit.h
|
||||
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
||||
@$(call PREPROCESS, $(BLITDIR)/nxglib_filltrapezoid.c, $(TFILL_TMP))
|
||||
@cat $(TFILL_TMP) | sed -e "/^#/d" >$@
|
||||
@rm -f $(TFILL_TMP)
|
||||
$(call PREPROCESS, $(BLITDIR)/nxglib_filltrapezoid.c, $(TFILL_TMP))
|
||||
$(Q) cat $(TFILL_TMP) | sed -e "/^#/d" >$@
|
||||
$(Q) rm -f $(TFILL_TMP)
|
||||
endif
|
||||
|
||||
$(RMOVE_CSRC) : $(BLITDIR)/nxglib_moverectangle.c nxglib_bitblit.h
|
||||
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
||||
@$(call PREPROCESS, $(BLITDIR)/nxglib_moverectangle.c, $(RMOVE_TMP))
|
||||
@cat $(RMOVE_TMP) | sed -e "/^#/d" >$@
|
||||
@rm -f $(RMOVE_TMP)
|
||||
$(call PREPROCESS, $(BLITDIR)/nxglib_moverectangle.c, $(RMOVE_TMP))
|
||||
$(Q) cat $(RMOVE_TMP) | sed -e "/^#/d" >$@
|
||||
$(Q) rm -f $(RMOVE_TMP)
|
||||
endif
|
||||
|
||||
$(RCOPY_CSRC) : $(BLITDIR)/nxglib_copyrectangle.c nxglib_bitblit.h
|
||||
ifneq ($(NXGLIB_BITSPERPIXEL),)
|
||||
@$(call PREPROCESS, $(BLITDIR)/nxglib_copyrectangle.c, $(RCOPY_TMP))
|
||||
@cat $(RCOPY_TMP) | sed -e "/^#/d" >$@
|
||||
@rm -f $(RCOPY_TMP)
|
||||
$(call PREPROCESS, $(BLITDIR)/nxglib_copyrectangle.c, $(RCOPY_TMP))
|
||||
$(Q) cat $(RCOPY_TMP) | sed -e "/^#/d" >$@
|
||||
$(Q) rm -f $(RCOPY_TMP)
|
||||
endif
|
||||
|
||||
clean:
|
||||
@rm -f *~ .*.swp *.i
|
||||
$(call DELFILE, *.i)
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@rm -f nxglib_setpixel_*bpp.c
|
||||
@rm -f nxglib_fillrectangle_*bpp.c
|
||||
@rm -f nxglib_getrectangle_*bpp.c
|
||||
@rm -f nxglib_filltrapezoid_*bpp.c
|
||||
@rm -f nxglib_moverectangle_*bpp.c
|
||||
@rm -f nxglib_copyrectangle_*bpp.c
|
||||
$(call DELFILE, nxglib_setpixel_*bpp.c)
|
||||
$(call DELFILE, nxglib_fillrectangle_*bpp.c)
|
||||
$(call DELFILE, nxglib_getrectangle_*bpp.c)
|
||||
$(call DELFILE, nxglib_filltrapezoid_*bpp.c)
|
||||
$(call DELFILE, nxglib_moverectangle_*bpp.c)
|
||||
$(call DELFILE, nxglib_copyrectangle_*bpp.c)
|
||||
|
||||
@@ -100,6 +100,8 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest,
|
||||
FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
|
||||
struct nxsvrmsg_bitmap_s outmsg;
|
||||
int i;
|
||||
int ret;
|
||||
sem_t sem_done;
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!wnd || !dest || !src || !origin)
|
||||
@@ -124,7 +126,32 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest,
|
||||
outmsg.origin.y = origin->y;
|
||||
nxgl_rectcopy(&outmsg.dest, dest);
|
||||
|
||||
|
||||
/* Create a semaphore for tracking command completion */
|
||||
|
||||
outmsg.sem_done = &sem_done;
|
||||
ret = sem_init(&sem_done, 0, 0);
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
gdbg("sem_init failed: %d\n", errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Forward the fill command to the server */
|
||||
|
||||
return nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_bitmap_s));
|
||||
ret = nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_bitmap_s));
|
||||
|
||||
/* Wait that the command is completed, so that caller can release the buffer. */
|
||||
|
||||
if (ret == OK)
|
||||
{
|
||||
ret = sem_wait(&sem_done);
|
||||
}
|
||||
|
||||
/* Destroy the semaphore and return. */
|
||||
|
||||
sem_destroy(&sem_done);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ int nx_block(NXWINDOW hwnd, FAR void *arg)
|
||||
* that it will not be blocked.
|
||||
*/
|
||||
|
||||
ret = nxmu_sendserver(wnd->conn, &outmsg, sizeof(struct nxbe_window_s));
|
||||
ret = nxmu_sendserver(wnd->conn, &outmsg, sizeof(struct nxsvrmsg_blocked_s));
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -98,7 +98,9 @@ int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
|
||||
{
|
||||
FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
|
||||
struct nxsvrmsg_getrectangle_s outmsg;
|
||||
|
||||
int ret;
|
||||
sem_t sem_done;
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!hwnd || !rect || !dest)
|
||||
{
|
||||
@@ -118,7 +120,31 @@ int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
|
||||
|
||||
nxgl_rectcopy(&outmsg.rect, rect);
|
||||
|
||||
/* Create a semaphore for tracking command completion */
|
||||
|
||||
outmsg.sem_done = &sem_done;
|
||||
ret = sem_init(&sem_done, 0, 0);
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
gdbg("sem_init failed: %d\n", errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Forward the fill command to the server */
|
||||
|
||||
return nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_getrectangle_s));
|
||||
ret = nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_getrectangle_s));
|
||||
|
||||
/* Wait that the command is completed, so that caller can release the buffer. */
|
||||
|
||||
if (ret == OK)
|
||||
{
|
||||
ret = sem_wait(&sem_done);
|
||||
}
|
||||
|
||||
/* Destroy the semaphore and return. */
|
||||
|
||||
sem_destroy(&sem_done);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -392,6 +392,7 @@ struct nxsvrmsg_getrectangle_s
|
||||
unsigned int plane; /* The plane number to read */
|
||||
FAR uint8_t *dest; /* Memory location in which to store the graphics data */
|
||||
unsigned int deststride; /* Width of the destination memory in bytes */
|
||||
sem_t *sem_done; /* Semaphore to report when command is done. */
|
||||
};
|
||||
|
||||
/* Fill a trapezoidal region in the window with a color */
|
||||
@@ -425,6 +426,7 @@ struct nxsvrmsg_bitmap_s
|
||||
FAR const void *src[CONFIG_NX_NPLANES]; /* The start of the source image. */
|
||||
struct nxgl_point_s origin; /* Offset into the source image data */
|
||||
unsigned int stride; /* The width of the full source image in pixels. */
|
||||
sem_t *sem_done; /* Semaphore to report when command is done. */
|
||||
};
|
||||
|
||||
/* Set the color of the background */
|
||||
@@ -586,6 +588,25 @@ EXTERN int nxmu_sendwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg,
|
||||
EXTERN int nxmu_sendclient(FAR struct nxfe_conn_s *conn,
|
||||
FAR const void *msg, size_t msglen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxmu_sendclientwindow
|
||||
*
|
||||
* Description:
|
||||
* Send a message to the client at NX_CLIMSG_PRIO priority
|
||||
*
|
||||
* Input Parameters:
|
||||
* wnd - A pointer to the back-end window structure
|
||||
* msg - A pointer to the message to send
|
||||
* msglen - The length of the message in bytes.
|
||||
*
|
||||
* Return:
|
||||
* OK on success; ERROR on failure with errno set appropriately
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxmu_sendclientwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg,
|
||||
size_t msglen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxmu_openwindow
|
||||
*
|
||||
|
||||
@@ -108,7 +108,7 @@ void nxmu_kbdin(FAR struct nxfe_state_s *fe, uint8_t nch, FAR uint8_t *ch)
|
||||
outmsg->ch[i] = ch[i];
|
||||
}
|
||||
|
||||
(void)nxmu_sendclient(fe->be.topwnd->conn, outmsg, size);
|
||||
(void)nxmu_sendclientwindow(fe->be.topwnd, outmsg, size);
|
||||
free(outmsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,9 +61,10 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static struct nxgl_point_s g_mpos;
|
||||
static struct nxgl_point_s g_mrange;
|
||||
static uint8_t g_mbutton;
|
||||
static struct nxgl_point_s g_mpos;
|
||||
static struct nxgl_point_s g_mrange;
|
||||
static uint8_t g_mbutton;
|
||||
static struct nxbe_window_s *g_mwnd;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
@@ -129,7 +130,7 @@ int nxmu_mousereport(struct nxbe_window_s *wnd)
|
||||
outmsg.buttons = g_mbutton;
|
||||
nxgl_vectsubtract(&outmsg.pos, &g_mpos, &wnd->bounds.pt1);
|
||||
|
||||
return nxmu_sendclient(wnd->conn, &outmsg, sizeof(struct nxclimsg_mousein_s));
|
||||
return nxmu_sendclientwindow(wnd, &outmsg, sizeof(struct nxclimsg_mousein_s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +155,7 @@ int nxmu_mousein(FAR struct nxfe_state_s *fe,
|
||||
struct nxbe_window_s *wnd;
|
||||
nxgl_coord_t x = pos->x;
|
||||
nxgl_coord_t y = pos->y;
|
||||
uint8_t oldbuttons;
|
||||
int ret;
|
||||
|
||||
/* Clip x and y to within the bounding rectangle */
|
||||
@@ -182,20 +184,36 @@ int nxmu_mousein(FAR struct nxfe_state_s *fe,
|
||||
{
|
||||
/* Update the mouse value */
|
||||
|
||||
g_mpos.x = x;
|
||||
g_mpos.y = y;
|
||||
g_mbutton = buttons;
|
||||
oldbuttons = g_mbutton;
|
||||
g_mpos.x = x;
|
||||
g_mpos.y = y;
|
||||
g_mbutton = buttons;
|
||||
|
||||
/* Pick the window to receive the mouse event. Start with
|
||||
* the top window and go down. Stop with the first window
|
||||
* that gets the mouse report
|
||||
/* If a button is already down, regard this as part of a mouse drag
|
||||
* event. Pass all the following events to the window where the drag
|
||||
* started in.
|
||||
*/
|
||||
|
||||
if (oldbuttons && g_mwnd && g_mwnd->cb->mousein)
|
||||
{
|
||||
struct nxclimsg_mousein_s outmsg;
|
||||
outmsg.msgid = NX_CLIMSG_MOUSEIN;
|
||||
outmsg.wnd = g_mwnd;
|
||||
outmsg.buttons = g_mbutton;
|
||||
nxgl_vectsubtract(&outmsg.pos, &g_mpos, &g_mwnd->bounds.pt1);
|
||||
|
||||
return nxmu_sendclientwindow(g_mwnd, &outmsg, sizeof(struct nxclimsg_mousein_s));
|
||||
}
|
||||
|
||||
/* Pick the window to receive the mouse event. Start with the top
|
||||
* window and go down. Stop with the first window that gets the mouse
|
||||
* report
|
||||
*/
|
||||
|
||||
for (wnd = fe->be.topwnd; wnd; wnd = wnd->below)
|
||||
{
|
||||
/* The background window normally has no callback structure
|
||||
* (unless a client has taken control of the background via
|
||||
* nx_requestbkgd()).
|
||||
/* The background window normally has no callback structure (unless
|
||||
* a client has taken control of the background via nx_requestbkgd()).
|
||||
*/
|
||||
|
||||
if (wnd->cb)
|
||||
@@ -207,6 +225,8 @@ int nxmu_mousein(FAR struct nxfe_state_s *fe,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_mwnd = wnd;
|
||||
}
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -87,7 +87,7 @@ void nxfe_redrawreq(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s
|
||||
outmsg.more = false;
|
||||
nxgl_rectoffset(&outmsg.rect, rect, -wnd->bounds.pt1.x, -wnd->bounds.pt1.y);
|
||||
|
||||
(void)nxmu_sendclient(wnd->conn, &outmsg, sizeof(struct nxclimsg_redraw_s));
|
||||
(void)nxmu_sendclientwindow(wnd, &outmsg, sizeof(struct nxclimsg_redraw_s));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ void nxfe_reportposition(FAR struct nxbe_window_s *wnd)
|
||||
|
||||
/* And provide this to the client */
|
||||
|
||||
ret = nxmu_sendclient(wnd->conn, &outmsg, sizeof(struct nxclimsg_newposition_s));
|
||||
ret = nxmu_sendclientwindow(wnd, &outmsg, sizeof(struct nxclimsg_newposition_s));
|
||||
if (ret < 0)
|
||||
{
|
||||
gdbg("nxmu_sendclient failed: %d\n", errno);
|
||||
|
||||
@@ -112,3 +112,47 @@ int nxmu_sendwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg,
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxmu_sendclientwindow
|
||||
*
|
||||
* Description:
|
||||
* Send a message to the client at NX_CLIMSG_PRIO priority
|
||||
*
|
||||
* Input Parameters:
|
||||
* wnd - A pointer to the back-end window structure
|
||||
* msg - A pointer to the message to send
|
||||
* msglen - The length of the message in bytes.
|
||||
*
|
||||
* Return:
|
||||
* OK on success; ERROR on failure with errno set appropriately
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxmu_sendclientwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg,
|
||||
size_t msglen)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
/* Sanity checking */
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!wnd || !wnd->conn)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Ignore messages destined to a blocked window (no errors reported) */
|
||||
|
||||
if (!NXBE_ISBLOCKED(wnd))
|
||||
{
|
||||
/* Send the message to the server */
|
||||
|
||||
ret = nxmu_sendclient(wnd->conn, msg, msglen);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -451,6 +451,11 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev)
|
||||
{
|
||||
FAR struct nxsvrmsg_getrectangle_s *getmsg = (FAR struct nxsvrmsg_getrectangle_s *)buffer;
|
||||
nxbe_getrectangle(getmsg->wnd, &getmsg->rect, getmsg->plane, getmsg->dest, getmsg->deststride);
|
||||
|
||||
if (getmsg->sem_done)
|
||||
{
|
||||
sem_post(getmsg->sem_done);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -471,6 +476,11 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev)
|
||||
{
|
||||
FAR struct nxsvrmsg_bitmap_s *bmpmsg = (FAR struct nxsvrmsg_bitmap_s *)buffer;
|
||||
nxbe_bitmap(bmpmsg->wnd, &bmpmsg->dest, bmpmsg->src, &bmpmsg->origin, bmpmsg->stride);
|
||||
|
||||
if (bmpmsg->sem_done)
|
||||
{
|
||||
sem_post(bmpmsg->sem_done);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -62,9 +62,10 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static struct nxgl_point_s g_mpos;
|
||||
static struct nxgl_point_s g_mrange;
|
||||
static uint8_t g_mbutton;
|
||||
static struct nxgl_point_s g_mpos;
|
||||
static struct nxgl_point_s g_mrange;
|
||||
static uint8_t g_mbutton;
|
||||
static struct nxbe_window_s *g_mwnd;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
@@ -148,6 +149,7 @@ int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons)
|
||||
{
|
||||
FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle;
|
||||
struct nxbe_window_s *wnd;
|
||||
uint8_t oldbuttons;
|
||||
int ret;
|
||||
|
||||
/* Clip x and y to within the bounding rectangle */
|
||||
@@ -176,13 +178,27 @@ int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons)
|
||||
{
|
||||
/* Update the mouse value */
|
||||
|
||||
oldbuttons = g_mbutton;
|
||||
g_mpos.x = x;
|
||||
g_mpos.y = y;
|
||||
g_mbutton = buttons;
|
||||
|
||||
/* Pick the window to receive the mouse event. Start with
|
||||
* the top window and go down. Step with the first window
|
||||
* that gets the mouse report
|
||||
/* If a button is already down, regard this as part of a mouse drag
|
||||
* event. Pass all the following events to the window where the drag
|
||||
* started in.
|
||||
*/
|
||||
|
||||
if (oldbuttons && g_mwnd && g_mwnd->cb->mousein)
|
||||
{
|
||||
struct nxgl_point_s relpos;
|
||||
nxgl_vectsubtract(&relpos, &g_mpos, &g_mwnd->bounds.pt1);
|
||||
g_mwnd->cb->mousein((NXWINDOW)g_mwnd, &relpos, g_mbutton, g_mwnd->arg);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* Pick the window to receive the mouse event. Start with the top
|
||||
* window and go down. Step with the first window that gets the mouse
|
||||
* report
|
||||
*/
|
||||
|
||||
for (wnd = fe->be.topwnd; wnd; wnd = wnd->below)
|
||||
@@ -193,6 +209,8 @@ int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_mwnd = wnd;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -76,6 +76,9 @@ static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
|
||||
static void nxtk_kbdin(NXWINDOW hwnd, uint8_t nch, const uint8_t *ch,
|
||||
FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_NX_MULTIUSER
|
||||
static void nxtk_blocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@@ -95,6 +98,9 @@ const struct nx_callback_s g_nxtkcb =
|
||||
#ifdef CONFIG_NX_KBD
|
||||
, nxtk_kbdin /* kbdin */
|
||||
#endif
|
||||
#ifdef CONFIG_NX_MULTIUSER
|
||||
, nxtk_blocked
|
||||
#endif
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@@ -255,9 +261,20 @@ static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
|
||||
|
||||
nxgl_vectoradd(&abspos, pos, &fwnd->wnd.bounds.pt1);
|
||||
|
||||
/* In order to deliver mouse release events to the same window where the
|
||||
* mouse down event happened, we store the initial mouse down location.
|
||||
*/
|
||||
|
||||
if (fwnd->mbutton == 0 && buttons != 0)
|
||||
{
|
||||
fwnd->mpos = abspos;
|
||||
}
|
||||
|
||||
fwnd->mbutton = buttons;
|
||||
|
||||
/* Is the mouse position inside of the client window region? */
|
||||
|
||||
if (fwnd->fwcb->mousein && nxgl_rectinside(&fwnd->fwrect, &abspos))
|
||||
if (fwnd->fwcb->mousein && nxgl_rectinside(&fwnd->fwrect, &fwnd->mpos))
|
||||
{
|
||||
nxgl_vectsubtract(&relpos, &abspos, &fwnd->fwrect.pt1);
|
||||
fwnd->fwcb->mousein((NXTKWINDOW)fwnd, &relpos, buttons, fwnd->fwarg);
|
||||
@@ -265,7 +282,7 @@ static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
|
||||
|
||||
/* If the mouse position inside the toobar region? */
|
||||
|
||||
else if (fwnd->tbcb->mousein && nxgl_rectinside(&fwnd->tbrect, &abspos))
|
||||
else if (fwnd->tbcb->mousein && nxgl_rectinside(&fwnd->tbrect, &fwnd->mpos))
|
||||
{
|
||||
nxgl_vectsubtract(&relpos, &abspos, &fwnd->tbrect.pt1);
|
||||
fwnd->tbcb->mousein((NXTKWINDOW)fwnd, &relpos, buttons, fwnd->tbarg);
|
||||
@@ -292,6 +309,24 @@ static void nxtk_kbdin(NXWINDOW hwnd, uint8_t nch, const uint8_t *ch,
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxtk_blocked
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NX_MULTIUSER
|
||||
static void nxtk_blocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2)
|
||||
{
|
||||
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd;
|
||||
|
||||
/* Only the client window gets keyboard input */
|
||||
|
||||
if (fwnd->fwcb->blocked)
|
||||
{
|
||||
fwnd->fwcb->blocked((NXTKWINDOW)fwnd, fwnd->fwarg, arg2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
@@ -72,6 +72,11 @@ struct nxtk_framedwindow_s
|
||||
struct nxgl_rect_s fwrect;
|
||||
FAR const struct nx_callback_s *fwcb;
|
||||
FAR void *fwarg;
|
||||
|
||||
/* Initial mouse down location */
|
||||
|
||||
uint8_t mbutton;
|
||||
struct nxgl_point_s mpos;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user